package com.zhike.b2b;

public class Query
{
  public static String brand_UPDATE_RECOMMEND_BRAND = "update brand set recommend_brand = 1 where id = :VID";
  public static String product_class_GET_PRODUCT_CLASS_BY = "select store_path,list_rule from product_class where class_id = :VCLASS_ID";
  public static String product_class_GET_PRODUCT_CLASS_BY_NO = "select store_path,list_rule,class_id from product_class";
  public static String role_GET_ALL_ROLEINFO_TO_DHTMXTREE = "select * from role where role_auth_id = :VROLE_AUTH_ID";
  public static String delete_class_DELETE_PRODUCT_CLASS_BY_LIKE_CLASS_ID = "delete from product_class where class_id like :VCLASS_ID";
  public static String delete_class_DELETE_BOOKING_BY_LIKE_CLASS_ID = "delete from booking where class_id like :VCLASS_ID and info_state='3'";
  public static String delete_class_DELETE_BUYING_CLASS_BY_LIKE_CLASS_ID = "delete from buying_class where class_id like :VCLASS_ID";
  public static String delete_class_DELETE_SALES_CLASS_BY_LIKE_CLASS_ID = "delete from sales_class where class_id like :VCLASS_ID";
  public static String delete_class_DELETE_NEWS_CLASS_BY_LIKE_CLASS_ID = "delete from news_class where class_id like :VCLASS_ID";
  public static String company_UPDATE_RECOMMEND_COMPANY = "update company set recommend_company = 1 where cust_id = :VCUST_ID";
  public static String product_UPDATE_RECOMMEND_PRODUCT = "update product set recommend_product = 1 where product_id = :VPRODUCT_ID";
  public static String links_DELETE_INDEX_BY_IDX = "delete from links where trade_id=:VTRADE_ID";
  public static String service_class_INS_BY_ALL_PRODUCT_CLASS = "insert into service_class(class_id,class_name,class_desc,remove_tag,oper_user,list_model,index_model,content_model,store_path,list_rule,home_name,article_rule,dyna_show,oper_time)values(:VCLASS_ID,:VCLASS_NAME,:VCLASS_DESC,:VREMOVE_TAG,:VOPER_USER,:VLIST_MODEL,:VINDEX_MODEL,:VCONTENT_MODEL,:VSTOCE_PATH,:VLIST_RULE,:VHOME_NAME,:VARTICLE_RULE,:VDYNA_SHOW,now())";
  public static String service_class_UPDATE_BY_ALL_BUYING_CLASS = "update service_class set class_name=:VCLASS_NAME,class_desc=:VCLASS_DESC,remove_tag=:VREMOVE_TAG,oper_user=:VOPER_USER,list_model=:VLIST_MODEL,index_model=:VINDEX_MODEL,content_model=:VCONTENT_MODEL,store_path=:VSTORE_PATH,list_rule=:VLIST_RULE,home_name=:VHOME_NAME,article_rule=:VARTICLE_RULE,dyna_show=:VDYNA_SHOW where class_id=:VCLASS_ID";
  public static String service_class_UPDATE_BUYING_CLASS_NAME_BY_CLASS_ID = "update service set class_name=:VCLASS_NAME where class_id=:VCLASS_ID";
  public static String service_class_SEL_ALL_ONE_BY_NONE = "SELECT * FROM service_class WHERE LENGTH(class_id)=3 order by class_id";
  public static String service_class_SELECT_SON_BY_UP = "SELECT * FROM service_class WHERE LENGTH(class_id)=:VLENGTH AND class_id LIKE :VUP_ID order by class_id";
  public static String service_class_SELECT_BUYING_BY_CLASS_ID = "select service_id from service where class_id=:VCLASS_ID";
  public static String service_class_DELETE_BY_ALL_PRODUCT_CLASS = "delete from service_class where class_id=:VCLASS_ID";
  public static String service_class_SEL_ONE_BY_NONE = "SELECT MAX(class_id) as maxid FROM service_class WHERE LENGTH(class_id)=3";
  public static String service_class_SELECT_MAXID = "SELECT MAX(class_id) as maxid FROM service_class WHERE LENGTH(class_id)=:VLENGTH AND class_id LIKE :VUP_ID";
  public static String service_class_SEL_BY_CLASSID = "SELECT * FROM service_class where class_id=:VCLASS_ID";
  public static String service_class_GET_ALL_BUYING_CLASS = "select class_name,class_id,class_desc,store_path,remove_tag,dyna_show from service_class";
  public static String service_class_MOVE_BUYING_CLASS_BY_ID = "update service_class set class_id=:VCLASS_ID where class_id=:VUP_ID";
  public static String service_class_UPDATE_BUYING_BY_CLASS_ID = "update service set class_id=:VCLASS_ID where class_id=:VUP_ID";
  public static String service_class_SELECT_SON_BY_UP_INCLUDE_SELF = "select class_id,class_name from service_class where class_id like :VUP_ID";
  public static String service_class_SELECT_MAX_ID_BY_CLASS = "select max(class_id) as maxid from service_class where length(class_id)=:VLENGTH and class_id like :VUP_ID";
  public static String service_DELETE_BY_CLASS_SERVICE = "delete from service where class_id = :VCLASS_ID";
  public static String authority_GET_MENU_INFO_TO_LEFT = "select * from authority where user_id = :VUSER_ID ";
  public static String news_GET_NEWS = "select n.cust_id,n.publish_user_id,n.news_id,n.title,n.publish_date,n.class_id,n.attach_id,n.info_state,u.cust_name,u.user_name  from news n ,user_info u where n.publish_user_id=u.user_id and u.cust_name like :VCOMPANY and n.title like :VTITLE and u.user_name like :VUSER_NAME and n.info_state like :VVALIDITY";
  public static String news_GET_NEWS_ALL_END = "select n.cust_id,n.publish_user_id,n.news_id,n.title,n.publish_date,n.class_id,n.attach_id,n.info_state,u.cust_name,u.user_name  from news n ,user_info u where n.publish_user_id=u.user_id and u.cust_name like :VCOMPANY and n.title like :VTITLE and u.user_name like :VUSER_NAME and n.info_state like :VVALIDITY and date(n.publish_date)<=:VEND";
  public static String news_GET_NEWS_ALL_START = "select n.cust_id,n.publish_user_id,n.news_id,n.title,n.publish_date,n.class_id,n.attach_id,n.info_state,u.cust_name,u.user_name  from news n ,user_info u where n.publish_user_id=u.user_id and u.cust_name like :VCOMPANY and n.title like :VTITLE and u.user_name like :VUSER_NAME and n.info_state like :VVALIDITY and date(n.publish_date)>=:VSTART";
  public static String news_GET_NEWS_START_END = "select n.cust_id,n.publish_user_id,n.news_id,n.title,n.publish_date,n.class_id,n.attach_id,n.info_state,u.cust_name,u.user_name  from news n ,user_info u where n.publish_user_id=u.user_id and u.cust_name like :VCOMPANY and n.title like :VTITLE and u.user_name like :VUSER_NAME and n.info_state like :VVALIDITY and  date(n.publish_date)>=:VSTART and date(n.publish_date)<=:VEND";
  public static String buying_GET_NEWS = "select n.cust_id,n.publish_user_id,n.buying_id as news_id,n.buying_name as title,n.publish_date,n.class_id,n.attach_id,n.validity,u.cust_name,u.user_name from buying n,user_info u where n.publish_user_id=u.user_id and u.cust_name like :VCOMPANY and n.buying_name like :VTITLE and u.user_name like :VUSER_NAME and n.validity like :VVALIDITY";
  public static String buying_GET_NEWS_ALL_END = "select n.cust_id,n.publish_user_id,n.buying_id as news_id,n.buying_name as title,n.publish_date,n.class_id,n.attach_id,n.validity,u.cust_name,u.user_name from buying n,user_info u where n.publish_user_id=u.user_id and u.cust_name like :VCOMPANY and n.buying_name like :VTITLE and u.user_name like :VUSER_NAME and n.validity like :VVALIDITY and date(n.publish_date)<=:VEND";
  public static String buying_GET_NEWS_ALL_START = "select n.cust_id,n.publish_user_id,n.buying_id as news_id,n.buying_name as title,n.publish_date,n.class_id,n.attach_id,n.validity,u.cust_name,u.user_name from buying n,user_info u where n.publish_user_id=u.user_id and u.cust_name like :VCOMPANY and n.buying_name like :VTITLE and u.user_name like :VUSER_NAME and n.validity like :VVALIDITY and  date(n.publish_date)>=:VSTART";
  public static String buying_GET_NEWS_START_END = "select n.cust_id,n.publish_user_id,n.buying_id as news_id,n.buying_name as title,n.publish_date,n.class_id,n.attach_id,n.validity,u.cust_name,u.user_name from buying n,user_info u where n.publish_user_id=u.user_id and u.cust_name like :VCOMPANY and n.buying_name like :VTITLE and u.user_name like :VUSER_NAME and n.validity like :VVALIDITY and  date(n.publish_date)>=:VSTART and date(n.publish_date)<=:VEND";
  public static String sales_GET_NEWS = "select n.cust_id,n.publish_user_id,n.sales_id as news_id,n.title,n.publish_date,n.class_id,n.attach_id,n.validity,u.cust_name,u.user_name from sales n ,user_info u where n.publish_user_id=u.user_id and u.cust_name like :VCOMPANY and n.title like :VTITLE and u.user_name like :VUSER_NAME and n.validity like :VVALIDITY";
  public static String sales_GET_NEWS_ALL_END = "select n.cust_id,n.publish_user_id,n.sales_id as news_id,n.title,n.publish_date,n.class_id,n.attach_id,n.validity,u.cust_name,u.user_name from sales n ,user_info u where n.publish_user_id=u.user_id and u.cust_name like :VCOMPANY and n.title like :VTITLE and u.user_name like :VUSER_NAME and n.validity like :VVALIDITY and date(n.publish_date)<=:VEND";
  public static String sales_GET_NEWS_ALL_START = "select n.cust_id,n.publish_user_id,n.sales_id as news_id,n.title,n.publish_date,n.class_id,n.attach_id,n.validity,u.cust_name,u.user_name from sales n ,user_info u where n.publish_user_id=u.user_id and u.cust_name like :VCOMPANY and n.title like :VTITLE and u.user_name like :VUSER_NAME and n.validity like :VVALIDITY and  date(n.publish_date)>=:VSTART";
  public static String sales_GET_NEWS_START_END = "select n.cust_id,n.publish_user_id,n.sales_id as news_id,n.title,n.publish_date,n.class_id,n.attach_id,n.validity,u.cust_name,u.user_name from sales n ,user_info u where n.publish_user_id=u.user_id and u.cust_name like :VCOMPANY and n.title like :VTITLE and u.user_name like :VUSER_NAME and n.validity like :VVALIDITY and  date(n.publish_date)>=:VSTART and date(n.publish_date)<=:VEND";
  public static String product_GET_NEWS = "select n.cust_id,n.publish_user_id,n.product_id as news_id,n.product_name as title,n.publish_date,n.class_id,n.attach_id,n.validity,u.cust_name,u.user_name  from product n ,user_info u where n.publish_user_id=u.user_id and u.cust_name like :VCOMPANY and n.product_name like :VTITLE and u.user_name like :VUSER_NAME and n.validity like :VVALIDITY";
  public static String product_GET_NEWS_ALL_END = "select n.cust_id,n.publish_user_id,n.product_id as news_id,n.product_name as title,n.publish_date,n.class_id,n.attach_id,n.validity,u.cust_name,u.user_name  from product n ,user_info u where n.publish_user_id=u.user_id and u.cust_name like :VCOMPANY and n.product_name like :VTITLE and u.user_name like :VUSER_NAME and n.validity like :VVALIDITY and date(n.publish_date)<=:VEND";
  public static String product_GET_NEWS_ALL_START = "select n.cust_id,n.publish_user_id,n.product_id as news_id,n.product_name as title,n.publish_date,n.class_id,n.attach_id,n.validity,u.cust_name,u.user_name  from product n ,user_info u where n.publish_user_id=u.user_id and u.cust_name like :VCOMPANY and n.product_name like :VTITLE and u.user_name like :VUSER_NAME and n.validity like :VVALIDITY  date(n.publish_date)>=:VSTART";
  public static String product_GET_NEWS_START_END = "select n.cust_id,n.publish_user_id,n.product_id as news_id,n.product_name as title,n.publish_date,n.class_id,n.attach_id,n.validity,u.cust_name,u.user_name  from product n ,user_info u,company c where n.publish_user_id=u.user_id and n.cust_id=c.cust_id and c.cust_name like :VCOMPANY and n.product_name like :VTITLE and u.user_name like :VUSER_NAME and n.validity like :VVALIDITY and  date(n.publish_date)>=:VSTART and date(n.publish_date)<=:VEND";
  public static String news_DELETE_NEWS_BY_NEWS_ID = "delete from news where news_id=:VNEWS_ID";
  public static String attach_DELETE_ATTACH_BY_ATTACH_ID = "delete from attach where attach_root_id=:VATTACH_ROOT_ID";
  public static String bookmark_DELETE_BOOKMARK_BY_LINK_URL_NEWS = "delete from bookmark where link_type=5 and link_url=:VLINK_URL";
  public static String user_info_GET_USER_NAME_BY_USER_ID = "select cust_name from user_info where user_id = :VUSER_ID";
  public static String buying_DELETE_BUYING_BY_BUYING_ID = "delete from buying where buying_id=:VNEWS_ID";
  public static String bookmark_DELETE_BOOKMARK_BY_LINK_URL_BUYING = "delete from bookmark where link_type=3 and link_url=:VLINK_URL";
  public static String book_info_DELETE_BOOKINFO_BY_ROOT_ID_BUYING = "delete from book_info where info_state=0 and root_id=:VROOT_ID";
  public static String inquiry_DELETE_INQUIRY_BY_STOCK_ID = "delete from inquiry where stock_id=:VSTOCK_ID";
  public static String product_class_GET_PRODUCT_CLASS_NAME = "select class_id,class_name from product_class where remove_tag = 1";
  public static String brand_class_GET_BRAND_CLASS_NAME = "select class_id,class_name from brand_class where remove_tag = 1";
  public static String sales_DELETE_SALE_BY_SALES_ID = "delete from sales where sales_id=:VNEWS_ID";
  public static String bookmark_DELETE_BOOKMARK_BY_LINK_URL_SALES = "delete from bookmark where link_type=2 and link_url=:VLINK_URL";
  public static String book_info_DELETE_BOOKINFO_BY_ROOT_ID_SALES = "delete from book_info where info_state=1 and root_id=:VROOT_ID";
  public static String recommend_list_DELETE_RECOMMEND_BY_ROOT_ID_SALES = "delete from recommend_list where recommend_type=1 and root_id=:VROOT_ID";
  public static String inquiry_INS_INQUIRY_INFO_ALL_MORE = "insert into inquiry (trade_id,stock_id,title,product_num,product_price,content,cust_id,user_id,user_name,for_leave_id,for_leave_user,in_date,readed,pay_style,other_require,attach_url,cust_name) values(:VTRADE_ID,:VSTOCK_ID,:VTITLE,:VPRODUCT_NUM,:VPRODUCT_PRICE,:VCONTENT,:VCUST_ID,:VUSER_ID,:VUSER_NAME,:VFOR_LEAVE_ID,:VFOR_LEAVE_USER,now(),'0',:VPAY_STYLE,:VOTHER_REQUIRE,:VATTACH_URL,:VCUST_NAME)";
  public static String product_DELETE_PRODUCT_BY_PRODUCT_ID = "delete from product where product_id=:VNEWS_ID";
  public static String bookmark_DELETE_BOOKMARK_BY_LINK_URL_PRODUCT = "delete from bookmark where link_type=1 and link_url=:VLINK_URL";
  public static String book_info_DELETE_BOOKINFO_BY_ROOT_ID_PRODUCT = "delete from book_info where info_state=3 and root_id=:VROOT_ID";
  public static String recommend_list_DELETE_RECOMMEND_BY_ROOT_ID_PRODUCT = "delete from recommend_list where recommend_type=2 and root_id=:VROOT_ID";
  public static String order_list_DELETE_ORDER_BY_STOCK_ID = "delete from order_list where state in(0,1,2,4) and stock_id=:VSTOCK_ID";
  public static String product_attr_list_DELETE_PRODUCT_ATTR_BY_ROOT_ID = "delete from product_attr_list where  root_id=:VROOT_ID";
  public static String expo_list_REFRESH_EXPO_INFO = "update expo_list set oper_time=now() where expo_id=:VEXPO_ID";
  public static String expo_list_SEL_EXHIBITION_BY_CLASS_ID = "select e.expo_id,e.expo_name,e.expo_describe,e.attach_id,e.expo_area_name,e.expo_start_date,ec.store_path,ec.article_rule,e.class_id from expo_list e LEFT JOIN expo_class ec ON e.class_id=ec.class_id where e.class_id like :VCLASS_ID and e.remove_tag=1 AND e.expo_state =1 ORDER BY e.oper_time desc";
  public static String expo_list_SEL_RECOMMEND_EXHIBITION_INFO = "select e.expo_id,e.expo_name,e.expo_describe,e.attach_id,e.expo_area_name,e.expo_start_date,ec.store_path,ec.article_rule,e.class_id from expo_list e LEFT JOIN expo_class ec ON e.class_id=ec.class_id where e.remove_tag=1 AND e.expo_state =1 and commend=1 ORDER BY e.oper_time desc";
  public static String expo_list_SEL_EXHIBITION_INFO_BY_START_DATE = "select e.expo_id,e.expo_name,e.expo_area_name,e.expo_start_date,ec.store_path,ec.article_rule,e.class_id from expo_list e LEFT JOIN expo_class ec ON e.class_id=ec.class_id where (e.expo_name like :VKEYWORD or e.expo_area_name like :VKEYWORD) and e.expo_start_date >= :VEXPO_START_DATE AND e.remove_tag=1 AND e.expo_state =1 ORDER BY e.oper_time desc";
  public static String expo_list_SEL_EXHIBITION_INFO_BY_END_DATE = "select e.expo_id,e.expo_name,e.expo_area_name,e.expo_start_date,ec.store_path,ec.article_rule,e.class_id from expo_list e LEFT JOIN expo_class ec ON e.class_id=ec.class_id where (e.expo_name like :VKEYWORD or e.expo_area_name like :VKEYWORD) and e.expo_end_date <= :VEXPO_END_DATE AND e.remove_tag=1 AND e.expo_state =1 ORDER BY e.oper_time desc";
  public static String expo_list_SEL_EXHIBITION_INFO_BY_DATE = "select e.expo_id,e.expo_name,e.expo_area_name,e.expo_start_date,ec.store_path,ec.article_rule,e.class_id from expo_list e LEFT JOIN expo_class ec ON e.class_id=ec.class_id where (e.expo_name like :VKEYWORD or e.expo_area_name like :VKEYWORD) and e.expo_start_date >= :VEXPO_START_DATE and e.expo_end_date <= :VEXPO_END_DATE AND e.remove_tag=1 AND e.expo_state =1 ORDER BY e.oper_time desc";
  public static String expo_list_SEL_EXHIBITION_INFO_BY_KEYWORD = "select e.expo_id,e.expo_name,e.expo_area_name,e.expo_start_date,ec.store_path,ec.article_rule,e.class_id from expo_list e LEFT JOIN expo_class ec ON e.class_id=ec.class_id where (e.expo_name like :VKEYWORD or e.expo_area_name like :VKEYWORD) AND e.remove_tag=1 AND e.expo_state =1 ORDER BY e.oper_time desc";
  public static String user_info_SEL_NAME_BY_IDS = "select * from user_info where user_id=:VUSER_ID";
  public static String authority_DEL_AUTHORITY_INFO_BY_ALL = "delete from authority where menu_id = :VMENU_ID and role_name = :VROLE_NAME";
  public static String expo_list_INS_ONE_EXHIBITION_INFO = "insert into expo_list (expo_id,expo_name,expo_name_en,venue,organizer,undertaker,co_organizer,media_support,class_id,expo_class_name,expo_area,expo_area_name,exhibitor,floor_size,booth_quantity,expo_describe,expo_extent,expo_price,expo_items,attach_id,expo_start_date,expo_end_date,expo_website,expo_contact,phone,fax,other_contact,oper_user,oper_time,add_date,start_date,end_date,expo_state,email,expo_photo)values(:VEXPO_ID,:VEXPO_NAME,:VEXPO_NAME_EN,:VVENUE,:VORGANIZER,:VUNDERTAKER,:VCO_ORGANIZER,:VMEDIA_SUPPORT,:VEXPO_CLASS,:VEXPO_CLASS_NAME,:VEXPO_AREA,:VEXPO_AREA_NAME,:VEXHIBITOR,:VFLOOR_SIZE,:VBOOTH_QUANTITY,:VEXPO_DESCRIBE,:VEXPO_EXTENT,:VEXPO_PRICE,:VEXPO_ITEMS,:VATTACH,:VEXPO_START_DATE,:VEXPO_END_DATE,:VEXPO_WEBSITE,:VEXPO_CONTACT,:VPHONE,:VFAX,:VOTHER_CONTACT,:VOPER_USER,now(),now(),now(),:VEND_DATE,:VEXPO_STATE,:VEMAIL,:VEXPO_PHOTO)";
  public static String expo_list_SEL_EXHIBITION_INFO_BY_EXPO_ID = "select * from expo_list where expo_id=:VEXPO_ID";
  public static String expo_list_UPDATE_ONE_EXHIBITION_INFO = "update expo_list set expo_name=:VEXPO_NAME,expo_name_en=:VEXPO_NAME_EN,venue=:VVENUE,organizer=:VORGANIZER,undertaker=:VUNDERTAKER,co_organizer=:VCO_ORGANIZER,media_support=:VMEDIA_SUPPORT,class_id=:VEXPO_CLASS,expo_class_name=:VEXPO_CLASS_NAME,expo_area=:VEXPO_AREA,expo_area_name=:VEXPO_AREA_NAME,exhibitor=:VEXHIBITOR,floor_size=:VFLOOR_SIZE,booth_quantity=:VBOOTH_QUANTITY,expo_describe=:VEXPO_DESCRIBE,expo_extent=:VEXPO_EXTENT,expo_price=:VEXPO_PRICE,expo_items=:VEXPO_ITEMS,attach_id=:VATTACH,expo_start_date=:VEXPO_START_DATE,expo_end_date=:VEXPO_END_DATE,expo_website=:VEXPO_WEBSITE,expo_contact=:VEXPO_CONTACT,phone=:VPHONE,fax=:VFAX,other_contact=:VOTHER_CONTACT,oper_user=:VOPER_USER,oper_time=now(),expo_state=:VEXPO_STATE,email=:VEMAIL where expo_id=:VEXPO_ID";
  public static String expo_list_SEL_ALL_EXHITION_LIST = "select * from expo_list where expo_state!='9' order by oper_time desc";
  public static String expo_list_SEL_SEARCH_EXPOHIBITION_INFO = "select * from expo_list where expo_state!='9' and expo_name like :VEXPO_NAME and organizer like :VORGANIZER and expo_state like :VEXPO_STATE and class_id like :VCLASS_ID order by oper_time desc";
  public static String expo_list_UPDATE_HOT_EXPO = "update expo_list set hot_expo=:VHOT_EXPO where expo_id=:VEXPO_ID";
  public static String expo_list_UPDATE_LIST_TOP = "update expo_list set list_top=:VLIST_TOP where expo_id=:VEXPO_ID";
  public static String expo_list_UPDATE_COMMEND = "update expo_list set commend =:VCOMMEND,commend_user_id=:VCOMMEND_USER_ID,commend_time=now() where expo_id=:VEXPO_ID";
  public static String expo_list_UPDATE_EXPO_STATE = "update expo_list set expo_state=:VEXPO_STATE,oper_user=:VOPER_USER,start_date=now() where expo_id=:VEXPO_ID";
  public static String expo_list_UPDATE_EXPO_STATES = "update expo_list set expo_state=:VEXPO_STATE,oper_user=:VOPER_USER,end_date=now() where expo_id=:VEXPO_ID";
  public static String expo_list_SEL_EXPO_FOR_DELETE = "select expo_name,venue,organizer,class_id,expo_id,expo_class_name from expo_list where expo_state=:VEXPO_STATE and expo_name like :VEXPO_NAME and organizer like :VORGANIZER order by add_date desc";
  public static String expo_list_SEL_EXPO_FOR_DELETE_WITH_CLASS = "select expo_name,venue,organizer,class_id,expo_id,expo_class_name from expo_list where expo_state=:VEXPO_STATE and expo_name like :VEXPO_NAME and organizer like :VORGANIZER and class_id like :VCLASS_ID order by add_date desc";
  public static String expo_list_DELETE_EXPO = "delete from expo_list where expo_id=:VEXPO_ID";
  public static String expo_list_SEL_SEARCH_DEL_EXPOHIBITION_INFO = "select u.user_id,u.cust_id,u.user_name,u.cust_name,e.expo_id,e.expo_name,e.add_date,e.expo_start_date,e.expo_end_date,e.expo_state from expo_list e,user_info u where u.user_id = e.oper_user and u.cust_name like :VCUST_NAME and u.user_name like :VUSER_NAME and e.expo_name like :VEXPO_NAME and e.expo_start_date like :VEXPO_START_DATE and e.expo_end_date like :VEXPO_END_DATE and e.expo_state like :VEXPO_STATE order by e.add_date desc";
  public static String help_list_SEL_HELP_TITLE_LIST = "select help_id,help_name from help_list ";
  public static String help_list_SEL_HELP_CONTENT_LIST = "select help_comment from help_list";
  public static String help_list_ADD_HELP = "insert into help_list (help_id,help_name,help_url,help_comment,remove_tag,oper_user,oper_time) values (:VHELP_ID,:VHELP_NAME,:VHELP_URL,:VHELP_COMMENT,:VREMOVE_TAG_HELP,:VSESSION_USER_ID,now())";
  public static String help_list_SEL_HELPLIST_ALL_INFO = "select help_id,help_name,help_url,remove_tag,checked,oper_time from help_list order by help_id desc";
  public static String help_list_SEL_HELP_BY_SOUSUO = "select help_id,help_name,help_url,remove_tag,oper_time from help_list where help_name like :VHELP_NAME and oper_time>=:VSTARTIME and oper_time<=:VENDTIME and remove_tag like :VREMOVE_TAG_HELP order by help_id desc";
  public static String help_list_SEL_HELP_BY_HELPID = "select help_name,help_url,help_comment,remove_tag from help_list where help_id=:VHELP_ID";
  public static String help_list_EDIT_HELP = "update help_list set help_name=:VHELP_NAME,help_url=:VHELP_URL,help_comment=:VHELP_COMMENT,remove_tag=:VREMOVE_TAG_HELP,oper_user=:VSESSION_USER_ID,oper_time=now() where help_id=:VHELP_ID";
  public static String help_list_DELETE_HELP_BY_HELPID = "delete from help_list where help_id=:VHELP_ID";
  public static String help_list_SEL_HELP_BY_PATH = "select help_name,help_comment from help_list where help_url=:VPATH_TEMP";
  public static String recommend_list_INSERT_INTO_RECOMMEND_LIST_BY_ALL = "insert into recommend_list(recommend_id,recommend_type,root_id,recommend_state,class_id,cust_id,user_id,plan_start_date,activetime,pos_id,contact_info,enable_tag,oper_user,oper_time,in_date,price,cust_name,class_name,root_name,position_name) values(:VRECOMMEND_ID,:VRECOMMEND_TYPE,:VROOT_ID,0,:VCLASS_ID,:VCUST_ID,:VUSER_ID,:VPLAN_START_DATE,:VACTIVETIME,:VPOS_ID,:VCONTACT_INFO,1,:VUSER_ID,now(),now(),:VPRICE,:VCUST_NAME,:VCLASS_NAME,:VROOT_NAME,:VPOSITION_NAME)";
  public static String recommend_list_GET_RECOMMEND_LIST_ALL = "select recommend_id,recommend_type,root_id,recommend_state,class_id,start_date,plan_start_date,in_date,root_name,class_name,cust_name,position_name from recommend_list where cust_id = :VCUST_ID and enable_tag = 1 order by in_date desc";
  public static String recommend_list_GET_ONE_REC_LIST_INFO = "select * from recommend_list where recommend_id = :VRECOMMEND_ID";
  public static String recommend_list_UPDATE_INTO_RECOMMEND_LIST_BY_ALL = "update recommend_list set recommend_state=0,plan_start_date = :VPLAN_START_DATE,activetime=:VACTIVETIME,contact_info=:VCONTACT_INFO,oper_user=:VOPER_USER,oper_time=now() where recommend_id = :VRECOMMEND_ID";
  public static String recommend_list_DEL_INTO_RECOMMEND_LIST_BY_ALL = "update recommend_list set enable_tag=0,oper_user=:VOPER_USER,oper_time=now() where recommend_id = :VRECOMMEND_ID";
  public static String recommend_list_GET_RECOMMEND_STATE_BY_ID = "select recommend_state from recommend_list where recommend_id = :VRECOMMEND_ID";
  public static String recommend_list_GET_ALL_RECOMMEND_LIST_NO_CHECK = "select * from recommend_list where enable_tag=1 and recommend_state=0 order by oper_time ";
  public static String recommend_list_UPDATE_RECOMMEND_STATE_BY_ID = "update recommend_list set recommend_state = :VRECOMMEND_STATE,check_user=:VCHECK_USER,check_message=:VCHECK_MESSAGE,check_time=now(),start_date=now(),end_date=(INTERVAL :VACTIVETIME DAY + now()) where recommend_id = :VRECOMMEND_ID";
  public static String recommend_list_GET_ALL_RECOMMEND_LIST = "select recommend_id,root_id,class_id,cust_id,in_date,cust_name,recommend_type,root_name,class_name,start_date,activetime,contact_info,position_name from recommend_list where enable_tag=1 and recommend_state!=0 order by in_date desc";
  public static String recommend_list_UPDATE_RECOMMEND_NO_STATE_BY_ID = "update recommend_list set recommend_state = :VRECOMMEND_STATE,check_user=:VCHECK_USER,check_message=:VCHECK_MESSAGE,check_time=now() where recommend_id = :VRECOMMEND_ID";
  public static String recommend_list_GET_COMPANY_RECOMMEND_LIST = "SELECT C.CUST_NAME,C.CUST_SUPPLY,C.CUST_ID,C.LEVEL_LOGO,C.COMPANY_ADDRESS,C.ENTERPRISE_SCOPE,C.GROUP_CONTACT_PHONE,C.REGISTER_ATTACH,C.LOGO_IMG,U.USER_ID,CONCAT('/company/web/',C.CUST_ID,'/templates/index.html') AS NEWS_URL FROM COMPANY C,COMPANY_CLASS CC,USER_INFO U where C.CLASS_ID = CC.CLASS_ID AND U.CUST_ID=C.CUST_ID AND C.CUST_ID IN (SELECT RL.ROOT_ID FROM RECOMMEND_LIST RL,RECOMMEND_SITE R WHERE RL.POS_ID=R.POS_ID AND RL.START_DATE<=NOW() AND RL.END_DATE >=NOW() AND RECOMMEND_STATE =1 AND RL.RECOMMEND_TYPE=:VRECOMMEND_TYPE AND RL.POS_ID=:VPOS_ID) GROUP BY C.CUST_ID order by C.CUST_NAME DESC";
  public static String recommend_list_GET_PRODUCT_RECOMMEND_LIST = "SELECT DISTINCT P.PRODUCT_ID,P.PRODUCT_DESC,u.QQ,u.MSN,p.small_img,P.PRODUCT_NAME,p.product_abstract,p.attach_id,p.product_id,pc.store_path,pc.article_rule,pc.class_id,c.cust_id,c.cust_name,c.`level` `level`,C.GROUP_CONTACT_PHONE,A.AREA_NAME,SUBSTRING(P.PUBLISH_DATE,1,10) AS PUBLISH_DATE,aa.file_path file_path from (SELECT RL.ROOT_ID FROM RECOMMEND_LIST RL,RECOMMEND_SITE R WHERE RL.POS_ID=R.POS_ID AND RL.START_DATE<=NOW() AND RL.END_DATE >=NOW() AND RECOMMEND_STATE =1 AND RL.RECOMMEND_TYPE=? AND RL.POS_ID=?) rec left join PRODUCT P on p.product_id = rec.root_id and p.display_start_date <=now() and p.display_end_date >=now() and p.display=1 and p.validity =1 left join PRODUCT_CLASS PC on pc.class_id = p.class_id  and pc.dyna_show=1 left join COMPANY C on c.cust_id=p.cust_id left join USER_INFO u on u.USER_ID = p.PUBLISH_USER_ID left join attach aa on p.attach_id = aa.attach_root_id LEFT JOIN area_info A ON A.AREA_ID = P.AREA_ID order by P.PUBLISH_DATE DESC";
  public static String recommend_list_GET_SERVICE_RECOMMEND_LIST = "";
  public static String recommend_list_GET_SALES_RECOMMEND_LIST = "SELECT DISTINCT S.SALES_ID,s.PRODUCT_DESC,s.product_abstract,s.product_site,u.qq,u.msn,c.cust_id,c.cust_name,c.company_scope,c.cust_state,c.level_logo,c.group_contact_phone,sc.store_path,sc.article_rule,sc.class_id,A.AREA_NAME,S.SMALL_IMG,s.big_img,S.TITLE,SUBSTRING(S.PUBLISH_DATE,1,10) AS PUBLISH_DATE FROM SALES_CLASS SC,COMPANY C,SALES S LEFT JOIN user_info u ON u.cust_id=s.cust_id LEFT JOIN AREA_INFO A ON A.AREA_ID = S.AREA_ID  WHERE C.CUST_ID=S.CUST_ID AND S.CLASS_ID = SC.CLASS_ID AND S.DISPLAY_START_DATE <=NOW() AND S.DISPLAY_END_DATE >=NOW() AND SC.DYNA_SHOW=1 AND S.DISPLAY=1 AND S.VALIDITY =1 AND S.sales_id IN (SELECT RL.ROOT_ID FROM RECOMMEND_LIST RL,RECOMMEND_SITE R WHERE RL.POS_ID=R.POS_ID AND RL.START_DATE<=NOW() AND RL.END_DATE >=NOW() AND RECOMMEND_STATE =1 AND RL.RECOMMEND_TYPE=:VRECOMMEND_TYPE AND RL.POS_ID=:VPOS_ID) GROUP BY S.SALES_ID ORDER BY S.PUBLISH_DATE DESC";
  public static String recommend_site_SEL_ALL_NAME = "select pos_id,position_name from recommend_site";
  public static String recommend_site_INS_RECOMMEND_SITE_INFO_BY_ALL = "insert into recommend_site(recommend_site_id,recommend_site_type,position_name,pos_id,pos_desc,price_unit,price,enable_tag,oper_user,oper_time,in_date) values(:VRECOMMEND_SITE_ID,:VRECOMMEND_SITE_TYPE,:VPOSITION_NAME,:VPOS_ID,:VPOS_DESC,:VPRICE_UNIT,:VPRICE,1,:VOPER_USER,now(),now())";
  public static String recommend_site_GET_MAX_POS_ID = "select max(pos_id) pos_id from recommend_site";
  public static String recommend_site_SEL_RECOMMEND_BY_ALL = "select recommend_site_id,recommend_site_type,position_name,pos_desc,price_unit,price from recommend_site where enable_tag = '1' order by in_date desc";
  public static String recommend_list_GET_ALL_RECOMMEND_LIST2 = "select recommend_id,root_id,class_id,cust_id,in_date,cust_name,recommend_type,root_name,class_name,start_date,activetime,contact_info,position_name from recommend_list where enable_tag=1 and recommend_state!=0 and recommend_state!=1 order by in_date desc";
  public static String recommend_site_DEL_BY_RECOMMEND_SITE_ID = "update recommend_site set ENABLE_TAG = '0' where RECOMMEND_SITE_ID = :VRECOMMEND_SITE_ID";
  public static String recommend_site_GET_ONE_REC_SITE = "select recommend_site_type,position_name,pos_desc,price_unit,price from recommend_site where recommend_site_id=:VRECOMMEND_SITE_ID";
  public static String recommend_site_UPDATE_RECOMMEND_SITE_INFO_BY_ALL = "update recommend_site set recommend_site_type=:VRECOMMEND_SITE_TYPE,position_name=:VPOSITION_NAME,pos_desc=:VPOS_DESC,price_unit=:VPRICE_UNIT,price=:VPRICE,oper_user=:VOPER_USER,oper_time=now() where recommend_site_id =:VRECOMMEND_SITE_ID";
  public static String recommend_site_GET_REC_SITE_INFO = "select position_name,pos_id,price_unit,price from recommend_site where enable_tag = 1 and recommend_site_type = :VRECOMMEND_SITE_TYPE order by in_date desc";
  public static String sales_GET_SALES_INFO_BY_CUSTID = "select sales_id root_id,title root_name,class_id,class_name from sales where validity=1 and display_start_date <= now() and display_end_date >= now() and cust_id = :VCUST_ID";
  public static String product_GET_SERVICE_INFO_BY_CUSTID = "select product_id root_id,product_name root_name,class_id,class_name from product where validity=1 and product_type=1 and display_start_date <= now() and display_end_date >= now() and cust_id = :VCUST_ID";
  public static String product_GET_PRODUCT_INFO_BY_CUSTID = "select product_id root_id,product_name root_name,class_id,class_name from product where validity=1 and product_type=0 and display_start_date <= now() and display_end_date >= now() and cust_id = :VCUST_ID";
  public static String sales_GET_SALES_INFO_BY_CUSTID_KEY = "select sales_id root_id,title root_name,class_id,class_name from sales where validity=1 and product_type = 0 and display_start_date <= now() and display_end_date >= now() and cust_id = :VCUST_ID and title like :VKEYWORD";
  public static String product_GET_PRODUCT_INFO_BY_CUSTID_KEY = "select product_id root_id,product_name root_name,class_id,class_name from product where validity=1 and display_start_date <= now() and display_end_date >= now() and cust_id = :VCUST_ID and product_name like :VKEYWORD";
  public static String product_GET_PRODUCT_INFO_BY_CUSTID_KEY_SPECIAL = "select p.product_id root_id,p.product_name root_name,p.class_id,p.class_name from product p inner join product_class pc on pc.class_id=p.class_id where p.validity=1 and p.display_start_date <= now() and p.display_end_date >= now() and p.cust_id = :VCUST_ID and p.product_name like :VKEYWORD and p.class_id like :VCLASS_ID and p.product_id not in (select product_id from maxproduct) order by p.product_no desc";
  public static String product_GET_SERVICE_INFO_BY_CUSTID_KEY = "select product_id root_id,product_name root_name,class_id,class_name from product where validity=1 and display_start_date <= now() and display_end_date >= now() and product_type=1 and cust_id = :VCUST_ID and title :VKEYWORD";
  public static String bulletin_SEL_BY_MKEYWORD = "select b.TRADE_ID,b.TITLE,b.CONTENT,b.START_DATE,b.VALIDITY FROM BULLETIN b WHERE b.TITLE like :VTITLE and validity = 1 and b.START_DATE BETWEEN :VGDATE and :VENDDATE order by start_date desc";
  public static String bulletin_SEL_BY_MTITLE = "SELECT b.TRADE_ID,b.TITLE,b.CONTENT,b.START_DATE,b.VALIDITY FROM BULLETIN b WHERE TITLE like :VTITLE and validity = 1 order by start_date desc";
  public static String bulletin_SEL_BY_MENDDATE = "select b.trade_id,b.title,b.content,b.start_date,b.validity from bulletin b where b.title like :VTITLE and b.validity = 1 and b.start_date <= :VENDDATE order by start_date desc";
  public static String bulletin_SEL_BY_MGDATE = "select b.trade_id,b.title,b.content,b.start_date,b.validity from bulletin b where b.title like :VTITLE and b.validity = 1 and b.start_date >= :VGDATE order by start_date desc";
  public static String bulletin_SEL_BY_MALL = "select trade_id,title,content,start_date,validity from bulletin where validity = 1 order by start_date desc";
  public static String bulletin_DEL_BY_ID = "update bulletin b set b.validity=:VALIDITY where b.trade_id=:VTRADE_ID";
  public static String bulletin_SEL_BY_AKEYWORD = "select b.TRADE_ID,b.TITLE,b.CONTENT,b.START_DATE,b.VALIDITY FROM BULLETIN b WHERE b.TITLE like :VTITLE and validity <> 9 and b.START_DATE BETWEEN :VGDATE AND :VENDDATE order by start_date desc";
  public static String bulletin_INSERT_BY_ALL = "insert into bulletin(trade_id,title,content,start_date,oper_user,oper_time,add_date) values(:VTRADE_ID,:VTITLE,:VCONTENT,:VSTART_DATE,:VOPER_USER,now(),now())";
  public static String bulletin_SAVE_BY_ALL = "insert into bulletin(trade_id,title,content,start_date,validity,oper_user,oper_time,add_date) values(:VTRADE_ID,:VTITLE,:VCONTENT,:VSTART_DATE,:VALIDITY,:VOPER_USER,now(),now())";
  public static String bulletin_SEL_BY_AALL = "select trade_id,title,content,start_date,validity from bulletin where validity <> 9 order by start_date desc";
  public static String bulletin_SEL_BY_ID = "SELECT b.TITLE,b.CONTENT,b.START_DATE,b.VALIDITY,b.REMOVE_TAG FROM BULLETIN b WHERE TRADE_ID=:VTRADE_ID and validity <> 9 order by start_date desc";
  public static String bulletin_SEL_BY_ATITLE = "SELECT b.TRADE_ID,b.TITLE,b.CONTENT,b.START_DATE,b.VALIDITY FROM BULLETIN b WHERE TITLE like :VTITLE and validity <> 9 order by start_date desc";
  public static String bulletin_SEL_BY_AENDDATE = "select b.trade_id,b.title,b.content,b.start_date,b.validity from bulletin b where b.title like :VTITLE and b.validity <> 9 and b.start_date <= :VENDDATE order by start_date desc";
  public static String bulletin_SEL_BY_AGDATE = "select b.trade_id,b.title,b.content,b.start_date,b.validity from bulletin b where b.title like :VTITLE and b.validity <> 9 and b.start_date >= :VGDATE order by start_date desc";
  public static String bulletin_UPDATE_BY_ID = "update bulletin b set b.title=:VTITLE,b.content=:VCONTENT,b.start_date=:VSTART_DATE,b.validity=:VALIDITY,b.oper_user=:VOPER_USER,b.oper_time=now() where b.trade_id=:VTRADE_ID";
  public static String bulletin_GET_HOT_BBS_TOPICS = "select topic_title,topic_time from tbl_bbs_topics where limit 0,10";
  public static String high_search_SELECT_PRODUCT_FOR_HIGH = "SELECT product_id as id,product_name AS title,product_abstract AS content,cust_id AS publisher,publish_date,class_id FROM product WHERE validity='1' and product_name like :VTITLE and class_id like :VCLASS_ID ORDER BY publish_date";
  public static String high_search_SELECT_SALES_FOR_HIGH = "SELECT sales_id id,title,product_desc content,cust_id publisher,publish_date  publish_date,class_id FROM sales  WHERE validity='1'  and (product_name like :VTITLE or title like :VTITLE) and class_id like :VCLASS_ID ORDER BY publish_date";
  public static String high_search_SELECT_BUYING_FOR_HIGH = "SELECT buying_id id,buying_name title,buying_desc content,cust_id publisher,publish_date,class_id FROM buying WHERE validity='1' and buying_name like :VTITLE and class_id like :VCLASS_ID ORDER BY publish_date";
  public static String high_search_SELECT_COMPANY_FOR_HIGH = "SELECT a.cust_id id,a.cust_name title,a.company_scope content,a.cust_id publisher,a.oper_time publish_date,eparchy_code AS class_id FROM company a  WHERE a.cust_state='1' and a.cust_type='1' and cust_name like :VTITLE and eparchy_code like :VCLASS_ID";
  public static String high_search_SELECT_NEWS_FOR_HIGH = "SELECT news_id id,title,content,cust_id AS publisher,publish_date,class_id FROM news where title like :VTITLE and class_id like :VCLASS_ID";
  public static String high_search_SELECT_SERVICE_FOR_HIGH = "select service_id,service_name title,service_ABSTRACT content,cust_id publisher,publish_date,class_id ,service_site straddress from service where  display_start_date <=now() and  display_end_date >=now() and display=1 and validity =1 and service_name like :VTITLE and class_id like :VCLASS_ID order by publish_date";
  public static String high_search_SELECT_COMPANY_FOR_HIGH_SEARCH = "select * from company where  (level_id like :VLEVEL_ID or :VLEVEL_NAME = '%') and cust_name like :VCUST_NAME and eparchy_code like :VEPARCHY_CODE and (cust_supply like :VCUST_SUPPLY or :VCLASS_ID = '%') and cust_type!='0'";
  public static String high_search_SELECT_PRODUCT_FOR_HIGH_SEARCH = "select p.class_id,p.product_name,p.product_abstract,p.product_desc,p.product_id,p.small_img,c.cust_id,c.cust_name,c.eparchy_code from company c,product p where p.cust_id = c.cust_id and (c.level_id like :VLEVEL_ID  or ( :VLEVEL_ID ='%')) and c.eparchy_code like :VEPARCHY_CODE and p.product_name like :VPRODUCT_NAME and (applicable_addr like  :VAPPLICABLE_ADDR  or ( :VAPPLICABLE_ADDR = '%')) and p.class_id like :VCLASS_ID and validity='1'";
  public static String high_search_SELECT_PRODUCT_FOR_HIGH_SEARCH_PRICE = "select p.class_id,p.product_name,p.product_abstract,p.product_desc,p.product_id,p.small_img,c.cust_id,c.cust_name,c.eparchy_code from company c,product p where p.cust_id = c.cust_id and (c.level_id like :VLEVEL_ID  or ( :VLEVEL_ID ='%')) and c.eparchy_code like :VEPARCHY_CODE and p.product_name like :VPRODUCT_NAME and (applicable_addr like  :VAPPLICABLE_ADDR  or ( :VAPPLICABLE_ADDR = '%')) and p.class_id like :VCLASS_ID and validity='1' and p.product_price between :VSPRICE and :VEPRICE";
  public static String product_GET_CLASS_ID_PRODUCT = "SELECT PRODUCT_NAME,CLASS_ID FROM PRODUCT WHERE PRODUCT_ID = :VPRODUCT_ID";
  public static String sales_GET_CLASS_ID_SALES = "SELECT TITLE,CLASS_ID FROM SALES WHERE SALES_ID = :VSALES_ID";
  public static String buying_GET_CLASS_ID_BUYING = "SELECT BUYING_NAME,CLASS_ID FROM BUYING WHERE BUYING_ID = :VBUYING_ID";
  public static String company_GET_CLASS_ID_COMPANY = "SELECT CUST_NAME,CLASS_ID FROM COMPANY WHERE CUST_ID = :VCUST_ID";
  public static String news_GET_CLASS_ID_NEWS = "SELECT CLASS_ID,TITLE FROM NEWS WHERE NEWS_ID = :VNEWS_ID";
  public static String book_info_GET_ALL_BOOK_INFO_BUYING = "SELECT INFO_STATE,CUST_ID,EMAIL_TYPE,EMAIL,FOR_CUST_ID,FOR_USER_ID,ROOT_NAME,CLASS_NAME,CUST_NAME FROM BOOK_INFO WHERE ENABLE_TAG = '1' AND READ_TAG = '0' AND FOR_CUST_ID = :VFOR_CUST_ID AND INFO_STATE = 0";
  public static String book_info_GET_ALL_BOOK_INFO_SALES = "SELECT INFO_STATE,CUST_ID,EMAIL_TYPE,EMAIL,FOR_CUST_ID,FOR_USER_ID,ROOT_NAME,CLASS_NAME,CUST_NAME FROM BOOK_INFO WHERE ENABLE_TAG = '1' AND READ_TAG = '0' AND FOR_CUST_ID = :VFOR_CUST_ID AND INFO_STATE = 1";
  public static String book_info_GET_CUST_ID_MAIL = "SELECT distinct FOR_CUST_ID,EMAIL_TYPE,EMAIL FROM BOOK_INFO WHERE ENABLE_TAG = '1' AND READ_TAG = '0'";
  public static String booking_INS_BOOKING_BY_ALL = "INSERT INTO BOOKING(TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,EMAIL,ENABLE_TAG,FOR_CUST_ID,FOR_USER_ID,OPER_USER,OPER_TIME,IN_DATE) values(:VTRADE_ID,:VINFO_STATE,:VCLASS_ID,:VCUST_ID,:VSTART_DATE,:VEND_DATE,:VEMAIL_TYPE,:VEMAIL,:VENABLE_TAG,:VFOR_CUST_ID,:VFOR_USER_ID,:VOPER_USER,now(),now())";
  public static String booking_GET_All_BOOKING_INFO = "SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,ENABLE_TAG FROM BOOKING WHERE FOR_CUST_ID = :VCUST_ID ORDER BY OPER_TIME DESC";
  public static String booking_GET_All_BOOKING_INFO_MM = "SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,EMAIL,ENABLE_TAG,FOR_CUST_ID,FOR_USER_ID FROM BOOKING WHERE ENABLE_TAG = '1' AND END_DATE >= now()";
  public static String booking_DEL_BY_BOOKING_ID = "DELETE FROM BOOKING WHERE TRADE_ID = :VTRADE_ID";
  public static String booking_SEL_BY_INFOSTATE = "SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,ENABLE_TAG FROM BOOKING WHERE FOR_CUST_ID = :VCUST_ID AND INFO_STATE = :VINFO_STATE ORDER BY OPER_TIME DESC";
  public static String booking_SEL_BY_CLASSID = "SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,ENABLE_TAG FROM BOOKING WHERE FOR_CUST_ID = :VCUST_ID AND CLASS_ID = :VCLASS_ID ORDER BY OPER_TIME DESC";
  public static String booking_SEL_BY_STATE = "SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,ENABLE_TAG FROM BOOKING WHERE FOR_CUST_ID = :VCUST_ID AND ENABLE_TAG = :VSTATE ORDER BY OPER_TIME DESC";
  public static String booking_SEL_BY_OVER = "SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,ENABLE_TAG FROM BOOKING WHERE FOR_CUST_ID = :VCUST_ID AND END_DATE - now() <= 7 ORDER BY OPER_TIME DESC";
  public static String booking_SEL_BY_INFOSTATE_CLASSID = "SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,ENABLE_TAG FROM BOOKING WHERE FOR_CUST_ID = :VCUST_ID AND INFO_STATE = :VINFO_STATE AND CLASS_ID = :VCLASS_ID ORDER BY OPER_TIME DESC";
  public static String booking_SEL_BY_INFOSTATE_STATE = "SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,ENABLE_TAG FROM BOOKING WHERE FOR_CUST_ID = :VCUST_ID AND INFO_STATE = :VINFO_STATE AND ENABLE_TAG = :VSTATE ORDER BY OPER_TIME DESC";
  public static String booking_SEL_BY_INFO_STATE_OVER = "SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,ENABLE_TAG FROM BOOKING WHERE FOR_CUST_ID = :VCUST_ID AND INFO_STATE = :VINFO_STATE AND END_DATE-now() <= 7 ORDER BY OPER_TIME DESC";
  public static String booking_SEL_BY_CLASSID_STATE = "SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,ENABLE_TAG FROM BOOKING WHERE FOR_CUST_ID = :VCUST_ID AND CLASS_ID=:VCLASS_ID AND ENABLE_TAG=:STATE ORDER BY OPER_TIME DESC";
  public static String booking_SEL_BY_CLASSID_OVER = "SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,ENABLE_TAG FROM BOOKING WHERE FOR_CUST_ID = :VCUST_ID AND CLASS_ID=:VCLASS_ID AND END_DATE - now()<=7 ORDER BY OPER_TIME DESC";
  public static String booking_SEL_BY_STATE_OVER = " SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,ENABLE_TAG FROM BOOKING WHERE FOR_CUST_ID = :VCUST_ID AND ENABLE_TAG = :VSTATE AND END_DATE - now()<=7 ORDER BY OPER_TIME DESC";
  public static String booking_SEL_BY_INFOSTATE_CLASSID_STATE = " SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,ENABLE_TAG FROM BOOKING WHERE FOR_CUST_ID = :VCUST_ID AND INFO_STATE = :VINFO_STATE AND CLASS_ID=:VCLASS_ID AND ENABLE_TAG=:VSTATE ORDER BY OPER_TIME DESC";
  public static String booking_SEL_BY_INFOSTATE_CLASSID_OVER = " SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,ENABLE_TAG FROM BOOKING WHERE FOR_CUST_ID = :VCUST_ID AND INFO_STATE = :VINFO_STATE AND CLASS_ID=:VCLASS_ID AND END_DATE - now()<=7 ORDER BY OPER_TIME DESC";
  public static String booking_SEL_BY_INFOSTATE_STATE_OVER = "SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,ENABLE_TAG FROM BOOKING WHERE FOR_CUST_ID = :VCUST_ID AND INFO_STATE = :VINFO_STATE AND ENABLE_TAG = :VSTATE AND END_DATE - now()<=7 ORDER BY OPER_TIME DESC";
  public static String booking_SEL_BY_CLASSID_STATE_OVER = "SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,ENABLE_TAG FROM BOOKING WHERE FOR_CUST_ID = :VCUST_ID AND CLASS_ID = :VCLASS_ID AND ENABLE_TAG=:VSTATE AND END_DATE - now()<=7 ORDER BY OPER_TIME DESC";
  public static String booking_SEL_BY_INFOSTATE_CLASSID_STATE_OVER = "SELECT TRADE_ID,INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,ENABLE_TAG FROM BOOKING WHERE FOR_CUST_ID = :VCUST_ID AND INFO_STATE = :VINFO_STATE AND CLASS_ID = :VCLASS_ID AND ENABLE_TAG=:VSTATE AND END_DATE - now()<=7 ORDER BY OPER_TIME DESC";
  public static String booking_GET_ONE_BOOKING = "SELECT INFO_STATE,CLASS_ID,CUST_ID,START_DATE,END_DATE,EMAIL_TYPE,EMAIL,ENABLE_TAG,FOR_CUST_ID,FOR_USER_ID,OPER_USER,OPER_TIME,IN_DATE FROM BOOKING WHERE TRADE_ID = :VTRADE_ID";
  public static String booking_UPDATE_BOOKING_BY_ALL = "UPDATE BOOKING SET INFO_STATE = :VINFO_STATE,CLASS_ID=:VCLASS_ID,CUST_ID=:VCUST_ID,START_DATE=:VSTART_DATE,END_DATE=:VEND_DATE, EMAIL_TYPE=:VEMAIL_TYPE,EMAIL=:VEMAIL,ENABLE_TAG=:VENABLE_TAG WHERE TRADE_ID = :VTRADE_ID";
  public static String bookmark_INS_BOOK_MARK_ALL = "INSERT INTO BOOKMARK(LINK_ID,CUST_ID,LINK_NAME,LINK_URL,LINK_TYPE,ENABLE_TAG,OPER_USER,OPER_TIME,IN_DATE) values(:VLINK_ID,:VCUST_ID,:VLINK_NAME,:VLINK_URL,:VLINK_TYPE,'1',:VOPER_USER,now(),now())";
  public static String bookmark_INS_BOOK_MARK_BY_ALL = "INSERT INTO BOOKMARK(LINK_ID,CUST_ID,LINK_NAME,LINK_URL,LINK_TYPE,ENABLE_TAG,OPER_USER,OPER_TIME,IN_DATE) values(:VLINK_ID,:VCUST_ID,:VLINK_NAME,:VLINK_URL,:VLINK_TYPE,'1',:VOPER_USER,now(),now())";
  public static String bookmark_GET_ALL_BOOK_MARK = "SELECT LINK_ID,CUST_ID,LINK_NAME,LINK_URL,LINK_TYPE,IN_DATE,oper_time FROM BOOKMARK WHERE ENABLE_TAG = '1' AND CUST_ID = :VCUST_ID ORDER BY oper_time desc";
  public static String bookmark_SEL_ALL_BOOKMARK_KEY_START_INFO = "SELECT LINK_ID,CUST_ID,LINK_NAME,LINK_URL,LINK_TYPE,IN_DATE,oper_time FROM BOOKMARK WHERE ENABLE_TAG = '1' AND CUST_ID = :VCUST_ID AND LINK_NAME LIKE :VLINK_NAME AND IN_DATE > :VSTART ORDER BY oper_time desc";
  public static String bookmark_SEL_ALL_BOOKMARK_KEY_END_INFO = "SELECT LINK_ID,CUST_ID,LINK_NAME,LINK_URL,LINK_TYPE,IN_DATE,oper_time FROM BOOKMARK WHERE ENABLE_TAG = '1' AND CUST_ID = :VCUST_ID AND LINK_NAME LIKE :VLINK_NAME AND IN_DATE < :VEND ORDER BY oper_time";
  public static String bookmark_SEL_ALL_BOOKMARK_START_INFO = "select link_id,cust_id,link_name,link_url,link_type,in_date,oper_time from bookmark where enable_tag = '1' and cust_id = :VCUST_ID and in_date > :VSTART order by oper_time desc";
  public static String bookmark_SEL_ALL_BOOKMARK_TITLE_TIME_INFO = "SELECT  LINK_ID,CUST_ID,LINK_NAME,LINK_URL,LINK_TYPE,IN_DATE,oper_time FROM BOOKMARK WHERE ENABLE_TAG = '1' AND CUST_ID = :VCUST_ID AND LINK_NAME LIKE :VLINK_NAME AND IN_DATE > :VSTART AND IN_DATE < :VEND ORDER BY oper_time desc";
  public static String bookmark_SEL_ALL_BOOKMARK_TITLE_INFO = "SELECT LINK_ID,CUST_ID,LINK_NAME,LINK_URL,LINK_TYPE,IN_DATE,oper_time FROM BOOKMARK WHERE ENABLE_TAG = '1' AND CUST_ID = :VCUST_ID AND LINK_NAME LIKE :VLINK_NAME ORDER BY IN_DATE";
  public static String bookmark_SEL_ALL_BOOKMARK_TIME_INFO = " SELECT LINK_ID,CUST_ID,LINK_NAME,LINK_URL,LINK_TYPE,IN_DATE,oper_time FROM BOOKMARK WHERE ENABLE_TAG = '1' AND CUST_ID = :VCUST_ID  AND IN_DATE > :VSTART AND IN_DATE < :VEND ORDER BY oper_time desc";
  public static String bookmark_SEL_ALL_BOOKMARK_END_INFO = " select link_id,cust_id,link_name,link_url,link_type,in_date,oper_time from bookmark where enable_tag = '1' and cust_id = :VCUST_ID  and in_date < :VEND order by oper_time desc";
  public static String bookmark_DEL_BY_BOOKMARK_ID_1 = "UPDATE BOOKMARK set ENABLE_TAG = '0' where LINK_ID = :VLINK_ID";
  public static String bookmark_DEL_ALL_BOOKMARK = "UPDATE BOOKMARK set ENABLE_TAG = '0' where CUST_ID = :VCUST_ID";
  public static String questionnaire_SEL_ALL_QUE_INFO = "SELECT QUE_ID,QUE_TITLE,QUE_START_DATE,QUE_END_DATE,QUE_STATE FROM QUESTIONNAIRE where ENABLE_TAG = '1' ORDER BY IN_DATE DESC";
  public static String questionnaire_INS_QUE_BY_ALL = "INSERT INTO QUESTIONNAIRE(QUE_ID,QUE_TITLE,QUE_CONTENT,QUE_STATE,QUE_STATE_TIME,CON_TYPE,DEFAULT_TAG,CANCOMMENTS,QUE_START_DATE,USER_ID,IN_DATE,OPER_USER_ID,OPER_TIME) values(:VQUE_ID,:VQUE_TITLE,:VQUE_CONTENT,:VQUE_STATE,now(),:VCON_TYPE,'1',:VCANCOMMENTS,now(),:VUSER_ID,now(),:VOPER_USER_ID,now())";
  public static String questionnaire_INS_QUE_BY_ALL_SAVE = "INSERT INTO QUESTIONNAIRE(QUE_ID,QUE_TITLE,QUE_CONTENT,QUE_STATE,QUE_STATE_TIME,CON_TYPE,DEFAULT_TAG,CANCOMMENTS,QUE_START_DATE,USER_ID,IN_DATE,OPER_USER_ID,OPER_TIME) values(:VQUE_ID,:VQUE_TITLE,:VQUE_CONTENT,:VQUE_STATE,now(),:VCON_TYPE,'1',:VCANCOMMENTS,null,:VUSER_ID,now(),:VOPER_USER_ID,now())";
  public static String questionnaire_SEL_ONE_QUE_INFO = "select que_title, que_content, que_state, que_state_time, con_type, default_tag, cancomments, que_max, people_type, QUE_START_DATE,QUE_END_DATE, enable_tag from questionnaire where que_id = :VQUE_ID";
  public static String questionnaire_DEL_BY_QUE_ID = "update QUESTIONNAIRE set ENABLE_TAG = '0' where QUE_ID = :VQUE_ID";
  public static String questionnaire_UPDATE_QUE_BY_ALL = " UPDATE QUESTIONNAIRE set QUE_TITLE = :VQUE_TITLE,QUE_CONTENT=:VQUE_CONTENT,QUE_STATE=:VQUE_STATE,QUE_STATE_TIME=now(),QUE_START_DATE=now(),QUE_END_DATE=null,CON_TYPE=:VCON_TYPE, CANCOMMENTS=:VCANCOMMENTS,USER_ID=:VUSER_ID,OPER_USER_ID=:VOPER_USER_ID,OPER_TIME=now() where QUE_ID = :VQUE_ID";
  public static String questionnaire_SEL_ALL_QUE_TITLE_TIME_INFO = "SELECT QUE_ID,QUE_TITLE,QUE_STATE,PEOPLE_TYPE,QUE_START_DATE,QUE_END_DATE FROM QUESTIONNAIRE WHERE QUE_TITLE like :VQUE_TITLE and QUE_START_DATE >= :VSTART and QUE_START_DATE <= :VEND and ENABLE_TAG = '1' ORDER BY IN_DATE DESC";
  public static String questionnaire_SEL_ALL_QUE_TITLE_INFO = "SELECT QUE_ID,QUE_TITLE,QUE_STATE,PEOPLE_TYPE,QUE_START_DATE,QUE_END_DATE FROM QUESTIONNAIRE WHERE QUE_TITLE like :VQUE_TITLE and ENABLE_TAG = '1' ORDER BY IN_DATE DESC";
  public static String questionnaire_SEL_ALL_QUE_TIME_INFO = "SELECT QUE_ID,QUE_TITLE,QUE_STATE,PEOPLE_TYPE,QUE_START_DATE,QUE_END_DATE FROM QUESTIONNAIRE WHERE QUE_START_DATE >= :VSTART and QUE_START_DATE <= :VEND and ENABLE_TAG = '1' ORDER BY IN_DATE DESC";
  public static String questionnaire_IS_ISSUE_QUE_INFO = "SELECT QUE_ID from QUESTIONNAIRE where QUE_STATE = '1'";
  public static String questionnaire_UPDATE_QUE_STATE = "UPDATE QUESTIONNAIRE set QUE_STATE = '2', QUE_STATE_TIME=now(),QUE_END_DATE = now() WHERE QUE_STATE = '1'";
  public static String questionnaire_UPDATE_QUE_END_DATE = "UPDATE QUESTIONNAIRE set QUE_END_DATE = null WHERE QUE_STATE = '0' OR QUE_STATE='1'";
  public static String questionnaire_GET_QUE_STATE = "SELECT QUE_ID FROM QUESTIONNAIRE WHERE QUE_ID = :VQUE_ID AND QUE_STATE = '1'";
  public static String questionnaire_GET_QUE_STATES = "SELECT QUE_ID FROM QUESTIONNAIRE WHERE QUE_ID = :VQUE_ID AND QUE_STATE = '1' ";
  public static String questionnaire_attr_INS_QUE_ATTR_BY_ALL = "INSERT INTO QUESTIONNAIRE_ATTR(QUE_ATTR_ID,QUE_ID,QUE_TITLE,QUE_ATTR_NAME,QUE_ATTR_DESC,QUE_ATTR_NO,CON_TYPE,DEFAULT_TAG,CANCOMMENTS,ATTR_VALUE,USER_ID,IN_DATE,ENABLE_TAG,OPER_USER_ID,OPER_TIME) values(:VQUE_ATTR_ID,:VQUE_ID,:VQUE_TITLE,:VQUE_ATTR_NAME,:VQUE_ATTR_DESC,'1','0','1',:VCANCOMMENTS,'0',:VUSER_ID,now(),'1',:VOPER_USER_ID,now())";
  public static String questionnaire_attr_SEL_ONE_QUE_ATTR_INFO = "SELECT QUE_ATTR_NAME,QUE_ATTR_DESC FROM QUESTIONNAIRE_ATTR where que_id = :VQUE_ID ORDER BY QUE_ATTR_NAME";
  public static String questionnaire_attr_DEL_QUE_ATTR_BY_QUE_ID = "DELETE FROM QUESTIONNAIRE_ATTR where QUE_ID = :VQUE_ID";
  public static String questionnaire_attr_GET_AUE_ATTR_INFO_BY_QUEID = "select qa.que_attr_id,qa.que_id,qa.que_title,qa.que_attr_name,qa.que_attr_desc,q.con_type,qa.default_tag,qa.cancomments, q.que_content from QUESTIONNAIRE_ATTR qa, QUESTIONNAIRE q where qa.que_id = q.que_id and q.que_state = '1' order by qa.que_attr_name";
  public static String questionnaire_attr_SEL_ATTR_TITLE_INFO = "select QUE_ATTR_ID,QUE_ATTR_NAME,QUE_ATTR_DESC,CANCOMMENTS from QUESTIONNAIRE_ATTR where QUE_ID=:VQUE_ID ORDER BY QUE_ATTR_NAME";
  public static String questionnaire_list_INS_QUE_LIST_BY_ALL = "INSERT INTO QUESTIONNAIRE_LIST(QUE_LIST_ID, QUE_ID, QUE_TITLE, QUE_ATTR_ID, QUE_ATTR_NAME, QUE_ATTR_DESC, QUE_ATTR_NO, CON_TYPE, ATTR_VALUE, CANCOMMENTS, ENABLE_TAG, CUST_ID, IN_DATE) values(:VQUE_LIST_ID, :VQUE_ID, :VQUE_TITLE, :VQUE_ATTR_ID, :VQUE_ATTR_NAME, :VQUE_ATTR_DESC, 1, :VCON_TYPE, :VATTR_VALUE, :VCANCOMMENTS, 1, :VCUST_ID, now())";
  public static String questionnaire_list_SEL_ALL_QUE_LIST_INFO = "select IN_DATE,QUE_ATTR_NAME,ATTR_VALUE from QUESTIONNAIRE_LIST where QUE_ID = :VQUE_ID order by IN_DATE";
  public static String questionnaire_list_SEL_ALL_QUE_LIST_INFO_BY2 = "select IN_DATE,QUE_ATTR_NAME,ATTR_VALUE,CANCOMMENTS from QUESTIONNAIRE_LIST where QUE_ID = :VQUE_ID ORDER BY IN_DATE";
  public static String questionnaire_list_SEL_ALL_QUE_LIST_INFO_BY2_END = "select IN_DATE,QUE_ATTR_NAME,ATTR_VALUE,CANCOMMENTS from QUESTIONNAIRE_LIST where QUE_ID = :VQUE_ID and IN_DATE <= :VEND_DATE ORDER BY IN_DATE";
  public static String questionnaire_list_SEL_ALL_QUE_LIST_INFO_BY2_START = "select IN_DATE,QUE_ATTR_NAME,ATTR_VALUE,CANCOMMENTS from QUESTIONNAIRE_LIST where QUE_ID = :VQUE_ID and IN_DATE >= :VSTART_DATE ORDER BY IN_DATE";
  public static String questionnaire_list_SEL_ALL_QUE_LIST_INFO_BY2_ALL = "select IN_DATE,QUE_ATTR_NAME,ATTR_VALUE,CANCOMMENTS from QUESTIONNAIRE_LIST where QUE_ID = :VQUE_ID and IN_DATE >= :VSTART_DATE and IN_DATE <= :VEND_DATE ORDER BY IN_DATE";
  public static String questionnaire_list_SEL_ALL_QUE_LIST_INFO_BY = "select IN_DATE,QUE_ATTR_NAME,ATTR_VALUE,CANCOMMENTS from QUESTIONNAIRE_LIST where QUE_ID = :VQUE_ID and CANCOMMENTS = :VCANCOMMENTS ORDER BY IN_DATE";
  public static String questionnaire_list_SEL_ALL_QUE_LIST_INFO_BY_END = "select IN_DATE,QUE_ATTR_NAME,ATTR_VALUE,CANCOMMENTS from QUESTIONNAIRE_LIST where QUE_ID = :VQUE_ID and IN_DATE <= :VEND_DATE and CANCOMMENTS = :VCANCOMMENTS ORDER BY IN_DATE";
  public static String questionnaire_list_SEL_ALL_QUE_LIST_INFO_BY_START = "select IN_DATE,QUE_ATTR_NAME,ATTR_VALUE,CANCOMMENTS from QUESTIONNAIRE_LIST where QUE_ID = :VQUE_ID and IN_DATE >= :VSTART_DATE and CANCOMMENTS = :VCANCOMMENTS ORDER BY IN_DATE";
  public static String questionnaire_list_SEL_ALL_QUE_LIST_INFO_BY_ALL = "select IN_DATE,QUE_ATTR_NAME,ATTR_VALUE,CANCOMMENTS from QUESTIONNAIRE_LIST where QUE_ID = :VQUE_ID and IN_DATE >= :VSTART_DATE and IN_DATE <= :VEND_DATE and CANCOMMENTS = :VCANCOMMENTS ORDER BY IN_DATE";
  public static String questionnaire_list_GET_COUNT_BY_TITLE = "select QUE_LIST_ID FROM QUESTIONNAIRE_LIST WHERE QUE_ID=:VQUE_ID";
  public static String questionnaire_list_GET_COUNT_BY_TITLE_NOT_COMM = "select QUE_LIST_ID FROM QUESTIONNAIRE_LIST WHERE ATTR_VALUE != '未填写意见' and QUE_ID = :VQUE_ID";
  public static String questionnaire_list_GET_COUNT_BY_NAME = "select QUE_LIST_ID FROM QUESTIONNAIRE_LIST WHERE QUE_ATTR_ID=:VQUE_ATTR_ID";
  public static String questionnaire_list_IF_HAS_QUE_LIST = "SELECT QUE_ID FROM QUESTIONNAIRE_LIST WHERE QUE_ID = :VQUE_ID";
  public static String questionnaire_list_IF_HAS_QUE_LISTS = "SELECT QUE_ID FROM QUESTIONNAIRE_LIST WHERE QUE_ID = :VQUE_ID";
  public static String leavewords_GET_LEAVE_INFO_BY_NEW_ID = "select * from leavewords l where l.for_leave_cust = :VCUST_ID and l.new_id=:VNEW_ID order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_CUST_ID_FOR_LEAVE = "select l.leave_id,l.new_id,l.title,l.content,l.for_leave_id, l.word_type,l.in_date,l.readed from leavewords l where l.cust_id = :VCUST_ID and for_leave_id = :VFOR_LEAVE_ID order by in_date desc";
  public static String leavewords_INS_LEAVE_BY_ALL = "insert into leavewords(leave_id,new_id,title,content,word_type,cust_id,user_id,user_name,for_leave_id,for_leave_user,cellphone,phone,email,qq,contact_addr,other_contact,in_date,readed,for_leave_cust) values (:VLEAVE_ID,:VNEW_ID,:VTITLE,:VCONTENT,:VWORD_TYPE,:VCUST_ID,:VUSER_ID,:VUSER_NAME,:VFOR_LEAVE_ID, :VFOR_LEAVE_USER,:VCELLPHONE,:VPHONE,:VEMAIL,:VQQ,:VCONTACT_ADDR,:VOTHER_CONTACT,now(),0,:VFOR_LEAVE_CUST)";
  public static String leavewords_GET_LEAVEWORD_BY_CUST_ID = "select l.leave_id,l.new_id,l.title,l.content,l.for_leave_id,l.word_type,l.in_date,l.readed from leavewords l where l.cust_id = :VCUST_ID order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_CUST_ID_ACC = "select l.leave_id,l.new_id,l.title,l.content,l.for_leave_id,l.word_type,l.in_date,l.readed from leavewords l where l.for_leave_cust = :VCUST_ID order by in_date desc";
  public static String leavewords_DEL_BY_LEAVE_ID = "delete from leavewords where leave_id = :VLEAVE_ID";
  public static String leavewords_GET_LEAVE_INFO_BY_ID = "select l.* from leavewords l where l.leave_id = :VLEAVE_ID";
  public static String leavewords_GET_LEAVEWORD_BY_START_MEMBER = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where l.cust_id = :VCUST_ID and l.in_date >=:VSTART and l.content like :VKEYWORD order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_END_MEMBER = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where l.cust_id = :VCUST_ID and subString(l.in_date,1,10)<=:VEND and l.content like :VKEYWORD order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_KEY_MEMBER = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where l.cust_id = :VCUST_ID and l.content like :VKEYWORD order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_CUST_ID_TIME = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where l.cust_id = :VCUST_ID and l.in_date >=:VSTART and subString(l.in_date,1,10)<=:VEND and l.content like :VKEYWORD order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_CUST_ID_TIME_ACC = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where l.for_leave_cust = :VCUST_ID and l.in_date >=:VSTART and subString(l.in_date,1,10)<=:VEND and l.content like :VKEYWORD order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_START_MEMBER_ACC = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where l.for_leave_cust = :VCUST_ID and l.in_date >=:VSTART and l.content like :VKEYWORD order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_END_MEMBER_ACC = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where l.for_leave_cust = :VCUST_ID and subString(l.in_date,1,10)<=:VEND and l.content like :VKEYWORD order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_KEY_MEMBER_ACC = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where l.for_leave_cust = :VCUST_ID and l.content like :VKEYWORD order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_CUST_ID_KEY = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where l.title like :VKEYWORD and l.cust_id = :VCUST_ID order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_CUST_ID_KEY_ACC = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where l.title like :VKEYWORD and l.for_leave_cust = :VCUST_ID order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_CUST_ID_ADMIN = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where cust_id <> 100000000000000 and for_leave_cust <> 100000000000000 order by l.in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_CUST_ID_TIME_ADMIN = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where l.in_date >=:VSTART and subString(l.in_date,1,10)<=:VEND and content like :VKEYWORD and cust_id <> 100000000000000 and for_leave_cust <> 100000000000000 order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_START_ADMIN = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where l.in_date >=:VSTART and content like :VKEYWORD and cust_id <> 100000000000000 and for_leave_cust <> 100000000000000 order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_END_ADMIN = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where subString(l.in_date,1,10) <= :VEND and content like :VKEYWORD and cust_id <> 100000000000000 and for_leave_cust <> 100000000000000 order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_KEY_ADMIN = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where content like :VKEYWORD and cust_id <> 100000000000000 and for_leave_cust <> 100000000000000 order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_BY_CUST_ID_KEY_ADMIN = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where l.title like :VKEYWORD order by in_date desc";
  public static String leavewords_SEL_BY_LIUYAN_CONUT_FROM_LEAVEWORDS = "select a.leave_id from leavewords a where a.readed='0' and a.for_leave_user=:VCUST_ID";
  public static String leavewords_SEL_BY_GONGYING_CONUT_FROM_LEAVEWORDS = "select leave_id from leavewords where word_type='2' and for_leave_id=:VUSER_ID";
  public static String leavewords_GET_LEAVEWORD_CAIGOU_BY_CUST_ID = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where l.word_type='3' and l.for_leave_id=:VUSER_ID order by in_date desc";
  public static String leavewords_GET_LEAVEWORD_GONGYING_BY_CUST_ID = "select l.leave_id,l.new_id,l.title,l.content,l.word_type,l.in_date,l.readed from leavewords l where l.word_type='2' and l.for_leave_id=:VUSER_ID order by in_date desc";
  public static String leavewords_INS_FOR_SEARCH = "insert into leavewords(user_id,user_name,leave_id,new_id,cust_id,title,content,word_type,for_leave_cust,in_date,readed) values(:VUSER_ID,:VUSER_NAME,:VLEAVE_ID,:VNEW_ID,:VCUST_ID,:VTITLE,:VCONTENT,:VWORD_TYPE,:VFOR_LEAVE_CUST,now(),0)";
  public static String news_SEL_ALL_NEWS_BY_CLASS_ID = "select news_id,title,publish_date,update_time,class_name,info_state from news where class_id = :VCLASS_ID and remove_tag = 1 order by update_time desc";
  public static String buying_GET_BUYING_CLASS_INFO = "select buying_id,cust_id,buying_name,class_id,class_name,start_date from buying where class_id like :VCLASS_ID and validity = '1' and date_format(check_time,'%Y-%m-%d %h') >= :VTIME_INFO";
  public static String buying_GET_BUYING_CLASSID_CUSTID_INFO = "select buying_id,cust_id,buying_name,class_id,class_name,start_date from buying where class_id like :VCLASS_ID and cust_id = :VCUST_ID and validity = '1' and  date_format(check_time,'%Y-%m-%d %h') >= :VTIME_INFO";
  public static String news_SEL_ALLNEWS = "select oper_time,cust_id,news_id,title,publish_date,update_time,class_name,info_state,news_no from news where class_id like :VSELECT1 and (info_state = 1 or info_state=7 or info_state=8) and title like :VTITLE and substring(oper_time,1,10)>= :VSTART and substring(oper_time,1,10)<=:VEND order by oper_time desc";
  public static String news_SEL_ALLNEWS2 = "select oper_time,cust_id,news_id,title,publish_date,update_time,class_name,info_state,news_no from news where class_id like :VSELECT1 and info_state = :VSELECT2 and title like :VTITLE and substring(oper_time,1,10)>= :VSTART and substring(oper_time,1,10)<=:VEND order by oper_time desc";
  public static String news_SEL_MN_NEWS = "select oper_time,cust_id,news_id,title,publish_date,update_time,class_name,info_state,news_no from news where  cust_id =:VCUST_ID and class_id like :VSELECT1 and info_state = :VSELECT2 and title like :VTITLE and substring(oper_time,1,10)>= :VSTART and substring(oper_time,1,10)<=:VEND order by oper_time desc";
  public static String news_SEL_MB_NEWS = "select oper_time,cust_id,news_id,title,publish_date,update_time,class_name,info_state,news_no from news where  cust_id <>:VCUST_ID and class_id like :VSELECT1 and info_state = :VSELECT2 and title like :VTITLE and substring(oper_time,1,10)>= :VSTART and substring(oper_time,1,10)<=:VEND order by oper_time desc";
  public static String news_SEL_ALL_NEWS_NT_MN = "select n.oper_time,n.cust_id,n.news_id,n.title,n.publish_date,n.update_time,n.class_name,n.info_state,n.news_no from news n,company c where n.info_state=0 and c.cust_id=n.cust_id and c.cust_type<>0 and n.class_id like :VSELECT1 and  n.title like :VTITLE and substring(n.oper_time,1,10)>= :VSTART and substring(n.oper_time,1,10)<=:VEND order by n.oper_time";
  public static String news_SEL_ALL_NEWS_NT_XY = "select news_id,title,publish_date,class_name,info_state,news_no,oper_time from news where  cust_id = :VCUST_ID   and info_state like :VINFO_STATE and info_state<>9 and title like :VTITLE order by news_no desc,oper_time desc";
  public static String news_SEL_ALL_NEWS_NT_XY2 = "select news_id,title,publish_date,class_name,class_id,info_state,news_no,oper_time from news where  cust_id = :VCUST_ID   and info_state like :VINFO_STATE and info_state<>9 and title like :VTITLE and class_id like :VCLASS_ID and publish_date between :VSTART_DATE and  :VEND_DATE order by oper_time desc";
  public static String buying_SEL_ALL_NEWS_CHECK = "select c.cust_name,b.buying_id,b.cust_id,b.buying_name,b.class_name,b.start_date,b.end_date,b.update_time,b.validity,b.display,b.good_buying,b.commend,b.list_top,b.publish_date from company c,buying b where c.cust_id=b.cust_id and b.validity=0  and  c.cust_name like :VCUST_NAME and b.buying_name like :VBUYING_NAME order by publish_date";
  public static String buying_SEL_ALL_BUY = "select c.cust_name,b.buying_id,b.buying_name,b.start_date,b.end_date,b.list_top,b.good_buying,b.commend,b.validity from company c,buying b where c.cust_id=b.cust_id and (b.validity=1 or validity=4) and  c.cust_name like :VCUST_NAME and b.buying_name like :VBUYING_NAME order by buying_id desc";
  public static String sales_SEL_ALL_NEWS_CHECK = "select c.cust_name,b.sales_id as buying_id,b.title as buying_name,b.display_start_date as start_date,b.display_end_date as end_date,b.validity from company c,sales b where c.cust_id=b.cust_id and b.auto_state=:VAUTO_STATE and b.validity=0  and  c.cust_name like :VCUST_NAME and b.title like :VBUYING_NAME order by publish_date";
  public static String sales_SEL_ALL_SALE = "select c.cust_name,b.sales_id as buying_id,b.title as buying_name,b.display_start_date as start_date,b.display_end_date as end_date,b.list_top,b.good_sales as good_buying,b.commend,b.validity from company c,sales b where c.cust_id=b.cust_id and (b.validity=1 or validity=4) and  c.cust_name like :VCUST_NAME and b.title like :VBUYING_NAME order by sales_id desc";
  public static String buying_SEL_ALL_NEWS_NT_HY = "select b.buying_id,b.buying_name,b.validity,b.class_name,b.start_date,b.end_date,b.update_time,b.list_top,b.publish_date,b.oper_time from  buying b  where  b.cust_id =:VCUST_ID and b.validity = 1  and b.buying_name like :VBUYING_NAME  order by b.oper_time desc";
  public static String buying_SEL_ALL_NEWS_NT_DELETE = "select b.buying_id,b.buying_name,b.validity,b.class_name,b.start_date,b.end_date,b.update_time,b.list_top,b.publish_date from  buying b  where  b.cust_id =:VCUST_ID and b.buying_name like :VBUYING_NAME  order by b.buying_id desc";
  public static String buying_SEL_ALL_NEWS_NT_AMAND = "select b.buying_id,b.buying_name,b.validity,b.class_name,b.start_date,b.end_date,b.update_time,b.list_top,b.publish_date,b.oper_time from  buying b  where  b.cust_id =:VCUST_ID and b.buying_name like :VBUYING_NAME and b.validity like :VVALIDITY and  b.validity<>9 order by b.oper_time desc";
  public static String buying_SEL_ALL_BUYING_BY_DATE = "select b.buying_id,b.buying_name,b.validity,b.class_name,b.start_date,b.end_date,b.update_time,b.list_top,b.publish_date,b.oper_time from  buying b  where  b.cust_id =:VCUST_ID and (substring(b.oper_time,1,10) between :VSTART and :VEND) and b.class_id like :VCLASS_ID and b.buying_name like :VBUYING_NAME and b.validity like :VVALIDITY and  b.validity<>9 order by b.oper_time desc";
  public static String buying_SEL_ALL_BUYING_BY_END = "select b.buying_id,b.buying_name,b.validity,b.class_name,b.start_date,b.end_date,b.update_time,b.list_top,b.publish_date,b.oper_time from  buying b  where  b.cust_id =:VCUST_ID and (substring(b.oper_time,1,10) <= :VEND) and b.class_id like :VCLASS_ID and b.buying_name like :VBUYING_NAME and b.validity like :VVALIDITY and  b.validity<>9 order by b.oper_time desc";
  public static String buying_SEL_ALL_BUYING_BY_START = "select b.buying_id,b.buying_name,b.validity,b.class_name,b.start_date,b.end_date,b.update_time,b.list_top,b.publish_date,b.oper_time from  buying b  where  b.cust_id =:VCUST_ID and (substring(b.oper_time,1,10) >= :VSTART) and b.class_id like :VCLASS_ID and b.buying_name like :VBUYING_NAME and b.validity like :VVALIDITY and  b.validity<>9 order by b.oper_time desc";
  public static String buying_SEL_ALL_BUYING_BY_ALL = "select b.buying_id,b.buying_name,b.validity,b.class_name,b.start_date,b.end_date,b.update_time,b.list_top,b.publish_date,b.oper_time from  buying b  where  b.cust_id =:VCUST_ID and b.class_id like :VCLASS_ID and b.buying_name like :VBUYING_NAME and b.validity like :VVALIDITY and  b.validity<>9 order by b.oper_time desc";
  public static String sales_SEL_ALL_NEWS_NT_HY = "select b.sales_id as buying_id,b.title as buying_name,b.validity,b.class_name,b.display_start_date as start_date,b.display_end_date as end_date from  sales b where  b.cust_id =:VCUST_ID and b.title like :VBUYING_NAME and  date(b.display_start_date)>= :VSTART and date(b.display_start_date)<=:VEND and b.product_type like :VSELECT1 and b.validity like :VSELECT2 and b.validity<>9  order by sales_id desc";
  public static String buying_SEL_ALL_NEWS_NT_TIME = "select b.buying_id,b.buying_name,b.validity,b.class_name,b.start_date,b.end_date from  buying b where  b.cust_id =:VCUST_ID and b.buying_name like :VBUYING_NAME and  date(b.start_date)>= :VSTART and date(b.start_date)<=:VEND and b.buying_type like :VSELECT1 and b.validity like :VSELECT2 and b.validity<>9 and round(to_number(b.end_date-now()))<=7 and round(to_number(b.end_date-now()))>=0 order by buying_id desc";
  public static String sales_SEL_ALL_NEWS_NT_TIME = "select b.sales_id as buying_id,b.title as buying_name,b.validity,b.class_name,b.display_start_date as start_date,b.display_end_date as end_date from  sales b where  b.cust_id =:VCUST_ID and b.title like :VBUYING_NAME and  date(b.display_start_date)>= :VSTART and date(b.display_start_date)<=:VEND and b.product_type like :VSELECT1 and b.validity like :VSELECT2 and b.validity<>9 and round(to_number(b.display_end_date-now()))<=7 and round(to_number(b.display_end_date-now()))>=0 order by sales_id desc";
  public static String sales_GET_SALES_CLASS_INFO = "select sales_id,cust_id,title,class_id,class_name,display_start_date from sales where class_id like :VCLASS_ID and validity = '1' and  date_format(check_time,'%Y-%m-%d %h') >= :VTIME_INFO";
  public static String sales_GET_SALES_CLASSID_CUSTID_INFO = "select sales_id,cust_id,title,class_id,class_name,display_start_date from sales where class_id like :VCLASS_ID and cust_id = :VCUST_ID and validity = '1' and  date_format(check_time,'%Y-%m-%d %h') >= :VTIME_INFO";
  public static String sales_SELECT_SUPPLY_BY_CUST_ID = "select count(*) as count from sales where cust_id=:VCUST_ID and (validity=0 or validity=1 or validity=2 or validity=7) and round(now()-publish_date)<=7 and round(now()-publish_date)>=0 ";
  public static String news_SEL_ALL_NEWS_NT = "select c.cust_name,n.info_state,n.news_id,n.news_no,n.title,n.class_name,n.publish_date,n.commend,n.best_new,n.list_top,n.oper_time from news n,company c where  n.info_state=1 and c.cust_id=n.cust_id and c.cust_name like :VCUST_NAME and n.title like :VTITLE  order by n.oper_time desc";
  public static String buying_SELECT_ALL_BY_CLASS_ID = "select class_id from buying where class_id like :VCLASS_ID and start_date <=now() and end_date >=now() and display=1 and validity =1";
  public static String buying_SELECT_ALL_BY_CLASS_ID_FOR_NAME = "select class_name from buying_class where class_id = :VCLASS_ID";
  public static String news_SEL_NEWS_REPUB_YYS = "select c.cust_name,n.news_id,n.title,n.class_name,n.publish_date,n.update_time,n.remove_tag,n.info_state,n.best_new,n.commend,n.list_top from news n,company c where  c.cust_id=n.cust_id and n.remove_tag=0 and c.cust_name like :VCUST_NAME and n.title like :VTITLE order by n.news_id desc";
  public static String buying_SEL_ALL_NEWS_NT = "select c.cust_name,b.buying_id,b.buying_name,b.class_name,b.start_date,b.end_date,b.update_time,b.validity,b.display,b.good_buying,b.commend,b.list_top,b.publish_date from buying b,company c where  (b.validity = 1 or b.validity = 2 or b.validity = 0) and c.cust_id=b.cust_id and c.cust_name like :VCUST_NAME and b.buying_name like :VBUYING_NAME order by b.buying_id desc";
  public static String buying_SEL_ALL_NEWS_NT2 = "select c.cust_name,b.cust_id,b.buying_id,b.buying_name,b.class_name,b.start_date,b.end_date,b.update_time,b.validity,b.display,b.good_buying,b.commend,b.list_top,b.publish_date from buying b,company c where  ( b.validity = 2 or b.validity = 0) and c.cust_id=b.cust_id and c.cust_name like :VCUST_NAME and b.buying_name like :VBUYING_NAME order by b.buying_id desc";
  public static String buying_SEL_ALL_NEWS_INFO = "select c.cust_name,b.cust_id,b.buying_id,b.buying_name,b.class_name,b.start_date,b.end_date,b.update_time,b.validity,b.display,b.good_buying,b.commend,b.list_top,b.publish_date from buying b,company c where b.validity = '1' and c.cust_id=b.cust_id and c.cust_name like :VCUST_NAME and b.buying_name like :VBUYING_NAME order by b.buying_id desc";
  public static String buying_SEL_ALL_NEWS_REPUB = "select c.cust_name,b.cust_id,b.buying_id,b.buying_name,b.class_name,b.start_date,b.end_date,b.update_time,b.validity,b.display,b.good_buying,b.commend,b.list_top,b.publish_date from buying b,company c where c.cust_id=b.cust_id and b.validity=9 and  c.cust_name like :VCUST_NAME and b.buying_name like :VBUYING_NAME order by b.buying_id desc";
  public static String buying_CHECK_BY_BUYING_ID = "update buying set check_user=:VCHECK_USER,back_reason=:VBACK_REASON,validity=:VVALIDITY,check_time=now() where buying_id=:VBUYING_ID";
  public static String news_CHECK_BY_NEWS_ID = "update news set check_user=:VCHECK_USER,back_reason=:VBACK_REASON,info_state=:VINFO_STATE,check_time=now() where news_id=:VNEWS_ID";
  public static String buying_AUTO_CHECK_BUYING = "update buying set validity=1,check_time=now() where validity=0 and auto_state=1";
  public static String sales_CHECK_BY_BUYING_ID = "update sales set check_user=:VCHECK_USER,back_reason=:VBACK_REASON,validity=:VKDD,check_time=now() where sales_id=:VBUYING_ID";
  public static String sales_AUTO_CHECK_SALING = "update sales set validity=1,check_time=now() where validity=0 and auto_state=1";
  public static String news_MODIFY_BY_ID = "update news set news_no=:VNEWS_NO,user_id=:VUSER_ID,class_name=:VCLASS_NAME,class_id=:VCLASS_ID,update_time=now(),title=:VTITLE,content=:VCONTENT,news_src=:VNEWS_SRC,info_state=:VINFO_STATE,list_top=:VLIST_TOP where news_id=:VNEWS_ID";
  public static String user_info_SEL_BY_ONE = "select contact_name,user_type from user_info where user_id = :VUSER_ID";
  public static String company_SEL_SPEC_CUST_ID = "select group_contact_phone,fax_nbr,email,company_address,website,cust_name,cell_phone from company where cust_id=:VCUST_ID";
  public static String news_DEL_BY_ONE_MANA = "update news  set info_state = 9 where news_id=:VNEWS_ID";
  public static String news_REPUB_BY_ONE_MANA = "update news  set remove_tag = :VREMOVE_TAG where news_id=:VNEWS_ID";
  public static String buying_DEL_BY_ID_huiyuan = "update buying set validity = 9 where buying_id=:VBUYING_ID";
  public static String product_DEL_BY_ID_huiyuan = "update product set validity = 9 where product_id=:VBUYING_ID";
  public static String buying_DEL_BY_BUYINGID = "delete from  buying where buying_id=:VBUYING_ID";
  public static String product_DEL_BY_BUYINGID = "delete from  product where product_id=:VBUYING_ID";
  public static String sales_DEL_BY_BUYINGID = "delete from  sales where sales_id=:VBUYING_ID";
  public static String sales_DEL_BY_ID_huiyuan = "update sales set validity = 9 where sales_id=:VBUYING_ID";
  public static String buying_UNLOAD_BY_ID = "update buying set validity = 7,end_date=now() where buying_id=:VBUYING_ID";
  public static String product_UNLOAD_BY_ID = "update product set validity = 7,display_end_date=now() where product_id=:VBUYING_ID";
  public static String news_UNLOAD_BY_ONE_MANA = "update news set info_state = 7 where news_id=:VNEWS_ID";
  public static String sales_UNLOAD_BY_ID = "update sales set validity = 7,display_end_date=now() where sales_id=:VBUYING_ID";
  public static String buying_GOOD_BY_BUYING_ID = "update buying set good_buying = :VGOOD_BUYING where buying_id = :VBUYING_ID";
  public static String buying_SETGOOD_BY_BUYING_ID = "update buying set good_buying = :VPRAM where buying_id = :VBUYING_ID";
  public static String sales_SETGOOD_BY_BUYING_ID = "update sales set good_sales = :VPRAM where sales_id = :VBUYING_ID";
  public static String buying_COMMEND_BY_BUYING_ID = "update buying set commend = :VCOMMEND where buying_id = :VBUYING_ID";
  public static String buying_LIST_TOP_BY_BUYING_ID = "update buying set list_top = :VLIST_TOP where buying_id = :VBUYING_ID";
  public static String buying_SETCOMMEND_BY_BUYING_ID = "update buying set commend = :VPRAM where buying_id = :VBUYING_ID";
  public static String sales_SETCOMMEND_BY_BUYING_ID = "update sales set commend = :VPRAM where sales_id = :VBUYING_ID";
  public static String buying_SETFRIZING_BY_BUYING_ID = "update buying set validity = :VPRAM where buying_id = :VBUYING_ID";
  public static String sales_SETFRIZING_BY_BUYING_ID = "update sales set validity = :VPRAM where sales_id = :VBUYING_ID";
  public static String tradetype_UPDATE_TRADE_NAME_BY_BUYING_ID = "update tradetype set trade_name = :VTRADE_NAME where trade_type_code=1213";
  public static String buying_VDISPLAY_BY_BUYING_ID = "update buying set display = :VDISPLAY where buying_id = :VBUYING_ID";
  public static String buying_SELECT_ALL_BY_NONE = "select b.buying_id,c.cust_name,b.buying_name,b.class_name,b.start_date,b.end_date,b.update_time,b.validity,b.display,b.good_buying,b.commend,b.list_top from company c , buying b where b.cust_id=c.cust_id order by buying_id desc";
  public static String buying_SELECT_ALL_REPUB = "select b.buying_id,c.cust_name,b.buying_name,b.class_name,b.start_date,b.end_date,b.update_time,b.validity,b.display,b.good_buying,b.commend,b.list_top from company c , buying b where b.cust_id=c.cust_id and b.validity=9 order by buying_id desc";
  public static String buying_SELECT_ALL_BY_CHECK = "select b.buying_id,c.cust_name,b.buying_name,b.class_name,b.start_date,b.end_date,b.update_time,b.validity,b.display,b.good_buying,b.commend,b.list_top from company c , buying b where b.cust_id=c.cust_id and b.validity=0 order by buying_id desc";
  public static String news_SEL_ALL_NEWS = "select news_id,title,publish_date,class_name,info_state,list_top,update_time,remove_tag,best_new,commend from news order by news_id desc";
  public static String news_SEL_ALL_NEWS_RE = "select news_id,title,publish_date,class_name,content,info_state,list_top,update_time,remove_tag,best_new,commend from news where remove_tag=0 order by news_id desc";
  public static String news_COMMEND_BY_BUYING_ID = "update news set commend = :VCOMMEND where news_id = :VNEWS_ID";
  public static String news_BEST_BY_BUYING_ID = "update news set best_new = :VBEST_NEW where news_id = :VNEWS_ID";
  public static String news_STATE_BY_BUYING_ID = "update news set info_state = :VNEWS_STATE where news_id = :VNEWS_ID";
  public static String news_TOP_TIME_BY_BUYING_ID = "update news set list_top = 1 where news_id = :VNEWS_ID";
  public static String news_UP_TIME_BY_BUYING_ID = "update news set list_top = 0 where news_id = :VNEWS_ID";
  public static String news_SEL_BY_PK = "select c.cust_name,n.* from news n,company c where c.cust_id=n.cust_id and n.news_id = :VNEWS_ID";
  public static String news_INS_BY_BUYING_ID = "update news set oper_time = now() where news_id = :VBUYING_ID";
  public static String news_DEL_BY_ONE = "update news  set remove_tag = 0 where news_id=:VNEWS_ID";
  public static String news_SEL_BY_CUST_ID = "select n.news_id,n.title,n.publish_date,n.class_name,n.content,n.info_state,n.list_top,n.update_time,n.remove_tag,n.color,u.user_name from  news n,user_info u where n.cust_id = :VCUST_ID  and n.remove_tag = 1 and n.publish_user_id = u.user_id and n.cust_id=u.cust_id  order by news_id desc  ";
  public static String buying_TOP_TIME_BY_BUYING_ID = "update buying set list_top = 1 where buying_id = :VBUYING_ID";
  public static String buying_SEL_BY_PK = "select list_top,good_buying,commend,display,validity from buying where buying_id = :VBUYING_ID";
  public static String buying_UP_TIME_BY_BUYING_ID = "update buying set list_top = :VLIST_TOP where buying_id = :VBUYING_ID";
  public static String buying_UPDATE_BY_BUYING_ID = "update buying set list_top = :VPRAM where buying_id = :VBUYING_ID";
  public static String sales_UPDATE_BY_BUYING_ID = "update sales set list_top = :VPRAM where sales_id = :VBUYING_ID";
  public static String buying_INS_BY_BUYING_ID = "update buying set oper_time = now() where buying_id = :VBUYING_ID";
  public static String product_INS_BY_BUYING_ID = "update product set oper_time = now() where product_id = :VBUYING_ID";
  public static String sales_INS_BY_BUYING_ID = "update sales set oper_time = now() where sales_id = :VBUYING_ID";
  public static String buying_DEL_BY_ID = "update buying set validity = :VVALIDITY where buying_id=:VBUYING_ID";
  public static String buying_RETURN_BY_ID = "update buying set validity = 1 where buying_id=:VBUYING_ID";
  public static String buying_SELECT_ALL_BY_CUST_ID = "select u.cust_name,u.user_name,b.buying_id,b.buying_name,b.validity,b.class_name,b.start_date,b.end_date,b.update_time,b.list_top from  buying b,user_info u  where b.cust_id =:VCUST_ID and b.cust_id=u.cust_id  and b.validity = 1 and b.publish_user_id = u.user_id order by buying_id desc";
  public static String buying_SEL_BY_QIUGOU_OUT_TIME_CONUT = "select u.cust_name,u.user_name,b.buying_id,b.buying_name,b.validity,b.class_name,b.start_date,b.end_date,b.update_time,b.list_top from  buying b,user_info u  where b.cust_id =:VCUST_ID and b.cust_id=u.cust_id  and b.validity = 1 and b.publish_user_id = u.user_id and end_date < now() order by buying_id desc";
  public static String buying_SEL_order_buying_id = "select * from buying  where buying_id = :VBUYING_ID";
  public static String sales_SEL_order_buying_id = "select product_type as buying_type,back_reason,validity,cust_id,class_name,class_id,attach_id,oper_user,title as buying_name,product_desc as buying_desc,display_start_date as start_date,display_end_date as end_date,keyword as keywords from sales  where sales_id = :VBUYING_ID";
  public static String buying_UPDATE_BY_ALL = "update buying set buying_name=:VBUYING_NAME,class_id=:VCLASS_ID,class_name=:VCLASS_NAME,attach_id=:VATTACH_ID,attach_tag=:VATTACH_TAG,start_date=:VSTART_DATE,end_date=:VEND_DATE,buying_site=:VBUYING_SITE,buying_desc=:VBUYING_DESC,keywords=:VKEYWORDS,expect_prices=:VEXPECT_PRICES,moneytype=:VMONEYTYPE,buying_num=:VBUYING_NUM,product_spec_req=:VPRODUCT_SPEC_REQ,pack_type=:VPACK_TYPE,delivery=:VDELIVERY,certify_req=:VCERTIFY_REQ,logistics=:VLOGISTICS,oper_user=:VOPER_USER,cust_id=:VCUST_ID,oper_time=now(),update_time=now(),validity=:VVALIDITY,buying_unit=:VBUYING_UNIT where buying_id=:VBUYING_ID";
  public static String sales_UPDATE_BY_ALL = "update sales set auto_state=:VAUTO_STATE,product_type=:VBUYING_TYPE,title=:VBUYING_NAME,class_id=:VCLASS_ID,class_name=:VCLASS_NAME,display_start_date=:VSTART_DATE,display_end_date=:VEND_DATE,product_desc=:VBUYING_DESC,keyword=:VKEYWORDS,oper_user=:VOPER_USER,oper_time=now(),validity=:VVALIDITY where sales_id=:VBUYING_ID";
  public static String news_INS_BY_ALL_NOW = "insert into news(news_type,news_abstract,state_code_date,title,class_name,class_id,attach_id,content,user_id,publish_user_id,publish_date,news_id,cust_id,update_time,info_state,news_src,news_no) values(:VNEWS_TYPE,:VNEWS_ABSTRACT,now(),:VTITLE,:VCLASS_NAME,:VCLASS_ID,:VATTACH_ID,:VCONTENT,:VUSER_ID,:VPUBLISH_USER_ID,now(),:VNEWS_ID,:VCUST_ID,now(),:VINFO_STATE,:VNEWS_SRC,:VNEWS_NO)";
  public static String news_UPDATE_BY_ALL_NOW = "update news set title=:VTITLE, news_type=:VNEWS_TYPE,news_abstract=:VNEWS_ABSTRACT,title=:VTITLE,class_name=:VCLASS_NAME,class_id=:VCLASS_ID,content=:VCONTENT,user_id=:VUSER_ID,update_time=now(),info_state=:VINFO_STATE,news_src=:VNEWS_SRC where news_id=:VNEWS_ID";
  public static String news_INS_BY_ALL = "insert into news(news_type,news_abstract,title,class_name,class_id,attach_id,content,user_id,publish_user_id,publish_date,news_id,cust_id,update_time,info_state,news_src,news_no,oper_time) values(:VNEWS_TYPE,:VNEWS_ABSTRACT,:VTITLE,:VCLASS_NAME,:VCLASS_ID,:VATTACH_ID,:VCONTENT,:VUSER_ID,:VPUBLISH_USER_ID,now(),:VNEWS_ID,:VCUST_ID,now(),:VINFO_STATE,:VNEWS_SRC,:VNEWS_NO,now())";
  public static String buying_INS_BY_ALL = "insert into buying(buying_name,class_id,class_name,attach_id,attach_tag,start_date,end_date,buying_site,buying_desc,buying_unit,keywords,expect_prices,moneytype,buying_num,product_spec_req,pack_type,delivery,certify_req,logistics,cust_id,oper_user,publish_user_id,buying_id,oper_time,update_time,publish_date,validity) values(:VBUYING_NAME,:VCLASS_ID,:VCLASS_NAME,:VATTACH_ID,:VATTACH_TAG,:VSTART_DATE,:VEND_DATE,:VBUYING_SITE,:VBUYING_DESC,:VBUYING_UNIT,:VKEYWORDS,:VEXPECT_PRICES,:VMONEYTYPE,:VBUYING_NUM,:VPRODUCT_SPEC_REQ,:VPACK_TYPE,:VDELIVERY,:VCERTIFY_REQ,:VLOGISTICS,:VCUST_ID,:VOPER_USER,:VPUBLISH_USER_ID,:VBUYING_ID,now(),now(),now(),:VVALIDITY)";
  public static String sales_INS_BY_ALL_ST = "insert into sales(product_type,validity,title,class_id,class_name,attach_id,display_start_date,display_end_date,product_desc,buying_unit,keyword,cust_id,oper_user,publish_user_id,sales_id,oper_time,update_time,publish_date,update_user_id,auto_state) values(:VBUYING_TYPE,:VVALIDITY,:VBUYING_NAME,:VCLASS_ID,:VCLASS_NAME,:VATTACH_ID,:VSTART_DATE,:VEND_DATE,:VBUYING_DESC,,:VBUYING_UNIT:VKEYWORDS,:VCUST_ID,:VOPER_USER,:VPUBLISH_USER_ID,:VBUYING_ID,now(),now(),now(),:VUPDATE_USER_ID,:VAUTO_STATE)";
  public static String sales_UPDATE_RECOMMEND_SALES = "update sales set recommend_sales = 1 where sales_id = :VSALES_ID";
  public static String attach_SEL_BY_ROOT_ID_FILE = "select * from attach where attach_root_id=:VROOT_ID and file_type=:VFILE_TYPE";
  public static String attach_SEL_BY_ROOT_ID = "select * from attach where attach_root_id=:VROOT_ID and file_type='0'";
  public static String attach_SEL_BY_ATTACH_ROOT_ID = "select * from attach where attach_root_id=:VROOT_ID and file_type='2' ORDER BY add_date desc";
  public static String attach_INS_BY_ALL = "insert into attach(cust_id,user_id,attach_id,attach_root_id,file_type,file_path,add_date,attach_root_type,model) values(:VCUST_ID,:VUSER_ID,:VATTACH_ID,:VATTACH_ROOT_ID,:VFILE_TYPE,:VFILE_PATH,now(),:VATTACH_ROOT_TYPE,:VMODEL)";
  public static String attach_INS_HONOUR = "insert into attach(cust_id,user_id,attach_id,attach_root_id,file_type,file_path,add_date,attach_root_type,model,attach_name) values(:VCUST_ID,:VUSER_ID,:VATTACH_ID,:VATTACH_ROOT_ID,:VFILE_TYPE,:VFILE_PATH,now(),:VATTACH_ROOT_TYPE,:VMODEL,:VATTACH_NAME)";
  public static String attach_INS_BY_ALLS = "insert into attach(cust_id,user_id,attach_id,attach_root_id,file_type,file_path,add_date,attach_name,attach_desc,company_url,attach_root_type,model) values(:VCUST_ID,:VUSER_ID,:VATTACH_ID,:VATTACH_ROOT_ID,:VFILE_TYPE,:VFILE_PATH,now(),:VATTACH_NAME,:VATTACH_DESC,:VRSRV_STR2,:VATTACH_ROOT_TYPE,:VMODEL)";
  public static String attach_SEL_BY_THREE = "select *  from attach where attach_root_id=:VATTACH_ROOT_ID and attach_root_type=:VATTACH_ROOT_TYPE and model=:VMODEL order by add_date desc";
  public static String attach_DELETE_BY_ID = "delete from attach where attach_id=:VATTACH_ID";
  public static String attach_DELETE_ATTACH_BY_ID = "delete from attach where attach_root_id=:VATTACH_ROOT_ID";
  public static String attach_SEL_BY_ROOT = "select * from attach where attach_root_id=:VATTACH_ROOT_ID and file_type=:VFILE_TYPE";
  public static String attach_SEL_BY_ATTACH_ID = "select attach_name,file_path from attach where attach_id=:VATTACH_ID";
  public static String attach_SEL_VEDIO_BY_ROOT_ID = "select * from attach where attach_id=:VROOT_ID";
  public static String attach_UPDATE_ATTACH_DESC_BY_ATTACH_ID = "update attach set attach_desc =:VATTACH_DESC_UPDATE,company_url=:VRSRV_STR2 where attach_id=:VATTACH_ID";
  public static String attach_SEL_ADVICE_INFO = "select c.cust_name,count(*) as adnum,a.* from company c,attach a where c.cust_id = a.attach_root_id and c.cust_name like :VKEYWORD group by a.attach_root_id ";
  public static String attach_DELETE_BY_ATTACH_ROOT_ID = "delete from attach where attach_root_id=:VATTACH_ROOT_ID";
  public static String out_of_stock_INS_REGBUY = "insert into out_of_stock(trade_id,cust_id,user_id,class_id,class_name,title,in_date,description) values(:VTRADE_ID,:VCUST_ID,:VUSER_ID,:VCLASS_ID,:VCLASS_NAME,:VTITLE,:VIN_DATE,:VDESCRIPTION)";
  public static String out_of_stock_SELECT_REGS_BY_MEMBER = "select trade_id,description,class_name,in_date,re_time,read_state from out_of_stock where cust_id=:VCUST_ID and  read_state like :VREAD_STATE and (title like :VTITLE or description like :VTITLE) order by trade_id desc";
  public static String out_of_stock_SELECT_BY_TRADE_ID = "select title,cust_id,description,class_name,in_date,re_user_id,read_state,re_time,re_content from out_of_stock where trade_id = :VTRADE_ID";
  public static String out_of_stock_DEL_REG = "delete from out_of_stock where trade_id=:VTRADE_ID";
  public static String out_of_stock_SELECT_REGS_BY_ALL_ADMIN = "select trade_id,cust_id,re_user_id,description,class_name,in_date,re_time,read_state from out_of_stock where  read_state like :VREAD_STATE and (title like :VTITLE or description like :VTITLE) order by in_date";
  public static String out_of_stock_SELECT_REGS_BY_ADMIN = "select trade_id,cust_id,re_user_id,description,class_name,in_date,re_time,read_state from out_of_stock where re_user_id = :VRE_USER and  read_state like :VREAD_STATE and (title like :VTITLE or description like :VTITLE) order by in_date";
  public static String out_of_stock_INS_REPLY = "update out_of_stock set re_content=:VRE_CONTENT,read_state=1,re_user_id=:VRE_USER_ID,re_time=now() where trade_id=:VTRADE_ID";
  public static String order_sheet_UPDATE_ORDER_LIST_BY_BUYER = "update order_list set state=:VSTATE where order_id=:VORDER_ID";
  public static String order_sheet_UPDATE_ORDER_SHEET_BY_BUYER = "update order_sheet set buy_oper_user=:VBUY_OPER_USER,order_type=:VORDER_TYPE,buy_in_date=now() where order_id=:VORDER_ID";
  public static String order_sheet_UPDATE_ORDER_SHEET_BY_SALE = "update order_sheet set sale_oper_user=:VSALE_OPER_USER,order_type=:VORDER_TYPE,sale_in_date=now() where order_id=:VORDER_ID";
  public static String order_sheet_UPD_ORDER_BY_SALER_CUST_ID = "update order_sheet set sale_tel=:VSALE_TEL,sale_add=:VSALE_ADD,sale_user=:VSALE_USER,sale_bank=:VSALE_BANK,sale_bank_company=:VSALE_BANK_COMPANY,sale_bank_code=:VSALE_BANK_CODE,money=:VMONEY,moneytype=:VMONEYTYPE,order_comment=:VORDER_COMMENT,sale_oper_user=:VSALE_OPER_USER,order_type=:VORDER_TYPE,sale_in_date=now() where order_id=:VORDER_ID";
  public static String order_sheet_INS_ORDER_INFO = "insert into order_sheet(order_id,order_name,buyer_cust_id,buyer_cust_name,sale_cust_id,sale_cust_name,order_type,moneytype,site,buy_tel,buy_add,buy_mobile,buy_code,reve_user,oper_date,sum_money,stock_type) values(:VORDER_ID,:VORDER_NAME,:VBUYER_CUST_ID,:VBUYER_CUST_NAME,:VSALE_CUST_ID,:VSALE_CUST_NAME,:VORDER_TYPE,:VMONEYTYPE,:VSITE,:VBUY_TEL,:VBUY_ADD,:VBUY_MOBILE,:VBUY_CODE,:VREVE_USER,now(),:VSUM_MONEY,:VSTOCK_TYPE)";
  public static String order_sheet_UPD_ORDER_LIST = "update order_list set order_id=:VORDER_ID,state='2' where trade_id=:VTRADE_ID";
  public static String order_sheet_UPD_ORDER_BY_BUYER_CUST_ID = "update order_sheet set order_name=:VORDER_NAME,dead_date=:VDEAD_DATE,money=:VMONEY,moneytype=:VMONEYTYPE,site=:VSITE,buy_tel=:VBUY_TEL,buy_mobile=:VBUY_MOBILE,buy_add=:VBUY_ADD,buy_user=:VBUY_USER,buy_bank=:VBUY_BANK,buy_bank_company=:VBUY_BANK_COMPANY,buy_bank_code=:VBUY_BANK_CODE,buy_requirments=:VBUY_REQUIRMENTS,order_comment=:VORDER_COMMENT,order_type=:VORDER_TYPE,buy_oper_user=:VBUY_OPER_USER,buy_in_date=now() where order_id=:VORDER_ID";
  public static String order_sheet_SELECT_INTO_HISTORY = "insert into order_sheet_history  select:VTRADE_ID as trade_id ,l.* from order_sheet l where l.order_id=:VORDER_ID";
  public static String order_sheet_UPD_ORDER_LIST_BY_CLASS_BUYER_CUST_ID = "update order_list set order_id=:VORDER_ID,state='2' where buyer_cust_id=:VBUYER_CUST_ID and state='1' and stock_type='0' and cust_id=:VCUST_ID";
  public static String order_sheet_SEL_ORDER_INFO = "select order_id,order_name,buyer_cust_id,buyer_cust_name,sale_cust_id,sale_cust_name,order_type,price,discount,num,money,moneytype,dead_date,site,send_style,pay_style,buy_tel,buy_add,buy_user,buy_code,buy_bank,buy_bank_company,buy_bank_code,sale_tel,sale_add,sale_user,sale_code,sale_bank,sale_bank_company,sale_bank_code,reve_user,start_date,end_date,oper_date,carriage_pay,sum_money,order_comment,buy_oper_user,sale_oper_user,buy_in_date,sale_in_date from order_sheet where buyer_cust_id=:VBUYER_CUST_ID";
  public static String order_sheet_SEL_ORDER_INFO_BY_ORDER_ID = "select * from order_sheet where order_id=:VORDER_ID";
  public static String order_sheet_DEL_ORDER_SHEET = "delete from order_sheet where order_id=:VORDER_ID and order_type=0";
  public static String order_sheet_DEL_ORDER_LIST = "delete from order_sheet where order_id=:VORDER_ID";
  public static String order_sheet_DEL_ORDER_CART_LIST = "delete from order_list where order_id=:VORDER_ID";
  public static String order_sheet_SEL_CUSTOMER_ORDER_INFO = "select order_id,order_name,buyer_cust_id,buyer_cust_name,sale_cust_id,sale_cust_name,order_type,price,discount,num,money,moneytype,dead_date,site,send_style,pay_style,buy_tel,buy_add,buy_user,buy_code,buy_bank,buy_bank_company,buy_bank_code,sale_tel,sale_add,sale_user,sale_code,sale_bank,sale_bank_company,sale_bank_code,reve_user,start_date,end_date,oper_date,carriage_pay,sum_money,order_comment,buy_oper_user,sale_oper_user,buy_in_date,sale_in_date from order_sheet where order_type!='0' and order_type!='6' and sale_cust_id=:VSALE_CUST_ID";
  public static String order_sheet_SEL_CUSTOMER_ORDER_INFO_SALE = "select order_id,order_name,buyer_cust_id,buyer_cust_name,sale_cust_id,sale_cust_name,order_type,price,discount,num,money,moneytype,dead_date,site,send_style,pay_style,buy_tel,buy_add,buy_user,buy_code,buy_bank,buy_bank_company,buy_bank_code,sale_tel,sale_add,sale_user,sale_code,sale_bank,sale_bank_company,sale_bank_code,reve_user,start_date,end_date,oper_date,carriage_pay,sum_money,order_comment,buy_oper_user,sale_oper_user,buy_in_date,sale_in_date from order_sheet where sale_cust_id=:VSALE_CUST_ID order by oper_date desc";
  public static String order_sheet_SEL_ORDER_INFO_SEARCH_NO_TIME = "select * from order_sheet where buyer_cust_id=:VBUYER_CUST_ID and order_type like :VORDER_TYPE and order_name like :VORDER_NAME and order_id like :VORDER_ID";
  public static String order_sheet_SEL_ORDER_INFO_SEARCH_TIME = "select * from order_sheet where buyer_cust_id=:VBUYER_CUST_ID and order_type like :VORDER_TYPE and order_name like :VORDER_NAME and order_id like :VORDER_ID and date(oper_date) >= :VSTART_DATE and date(oper_date) <= :VEND_DATE";
  public static String order_sheet_SEL_ORDER_INFO_SEARCH_NO_TIME_SALE = "select order_id,order_name,buyer_cust_id,buyer_cust_name,sale_cust_id,sale_cust_name,order_type,price,discount,num,money,moneytype,dead_date,site,send_style,pay_style,buy_tel,buy_add,buy_user,buy_code,buy_bank,buy_bank_company,buy_bank_code,sale_tel,sale_add,sale_user,sale_code,sale_bank,sale_bank_company,sale_bank_code,reve_user,start_date,end_date,oper_date,carriage_pay,sum_money,order_comment,buy_oper_user,sale_oper_user,buy_in_date,sale_in_date from order_sheet where sale_cust_id=:VSALE_CUST_ID and order_type like :VORDER_TYPE and order_name like :VORDER_NAME and order_id like :VORDER_ID and order_type!='0' and order_type!='6'";
  public static String order_sheet_SEL_ORDER_INFO_SEARCH_TIME_SALE = "select order_id,order_name,buyer_cust_id,buyer_cust_name,sale_cust_id,sale_cust_name,order_type,price,discount,num,money,moneytype,dead_date,site,send_style,pay_style,buy_tel,buy_add,buy_user,buy_code,buy_bank,buy_bank_company,buy_bank_code,sale_tel,sale_add,sale_user,sale_code,sale_bank,sale_bank_company,sale_bank_code,reve_user,start_date,end_date,oper_date,carriage_pay,sum_money,order_comment,buy_oper_user,sale_oper_user,buy_in_date,sale_in_date from order_sheet where sale_cust_id=:VSALE_CUST_ID and order_type like :VORDER_TYPE and order_name like :VORDER_NAME and order_id like :VORDER_ID and date(oper_date) >= :VSTART_DATE and date(oper_date) <= :VEND_DATE and order_type!='0' and order_type!='6'";
  public static String order_sheet_SEL_ALL_ORDER_INFO = "select order_id,order_name,sale_cust_id,buyer_cust_id,buyer_cust_name,sale_cust_name,oper_date,money,moneytype,order_type from order_sheet order by oper_date desc";
  public static String order_sheet_SEL_ORDER_INFO_BUY_SEARCH = "select order_id,order_name,sale_cust_id,buyer_cust_id,buyer_cust_name,sale_cust_name,oper_date,money,moneytype,order_type from order_sheet  where order_id like :VORDER_ID and order_name like :VORDER_NAME and order_type like :VORDER_TYPE and sale_cust_id in (select cust_id from company where cust_name like :VSALE_CUST_NAME)  and buyer_cust_id in (select cust_id from company where cust_name like :VBUYER_CUST_NAME) order by oper_date desc";
  public static String order_sheet_SEL_ORDER_INFO_BUY_SEARCH_TIME = "select order_id,order_name,sale_cust_id,buyer_cust_id,buyer_cust_name,sale_cust_name,oper_date,money,moneytype,order_type from order_sheet  where order_id like :VORDER_ID and order_name like :VORDER_NAME and order_type like :VORDER_TYPE and sale_cust_id in (select cust_id from company where cust_name like :VSALE_CUST_NAME)  and buyer_cust_id in (select cust_id from company where cust_name like :VBUYER_CUST_NAME) and date(oper_date) >= :VSTART_DATE and date(oper_date) <= :VEND_DATE order by oper_date desc";
  public static String order_sheet_SEL_ALL_ORDER_INFO_GROUP = "select oper_date as oper_date,moneytype,sum(money) as money,count(order_id) as order_id  from order_sheet group by oper_date,moneytype";
  public static String order_sheet_SEL_ALL_ORDER_INFO_GROUP_CLASS = "select substr(class_id,1,6) as class_id, count(trade_id) as trade_id ,sum(stock_totle_price) as money from order_list  where   state='3' group by  substr(class_id,1,6)";
  public static String order_sheet_SEL_ALL_ORDER_INFO_GROUP_SON_CLASS = "select class_id,count(trade_id) as trade_id,sum(stock_totle_price) as money from order_list where   state='3' and class_id like :VCLASS_ID group by class_id";
  public static String order_sheet_SEL_ALL_ORDER_INFO_GROUP_CLASS_NO_TIME = "select substr(class_id,1,6) as class_id, count(trade_id) as trade_id ,sum(stock_totle_price) as money from order_list  where class_id like :VCLASS_ID and buyer_cust_id like :VBUYER_CUST_ID and cust_id like :VSALE_CUST_ID and state='3' group by  substr(class_id,1,6)";
  public static String order_sheet_SEL_ALL_ORDER_INFO_GROUP_CLASS_YES_TIME = "select substr(class_id,1,6) as class_id, count(trade_id) as trade_id ,sum(stock_totle_price) as money from order_list  where class_id like :VCLASS_ID and buyer_cust_id like :VBUYER_CUST_ID and cust_id like :VSALE_CUST_ID and state='3'and add_date between :VSTART_DATE and  :VEND_DATE group by  substr(class_id,1,6)";
  public static String order_sheet_SEL_ALL_ORDER_INFO_GROUP_DAY = "select oper_date as oper_date,moneytype,sum(money) as money,count(order_id) as order_id  from order_sheet where order_type like :VORDER_TYPE and  buyer_cust_id like :VBUYER_CUST_ID and sale_cust_id like :VSALE_CUST_ID and moneytype like :VMONEYTYPE  group by oper_date,moneytype order by oper_date desc";
  public static String order_sheet_SEL_ALL_ORDER_INFO_GROUP_DAY_TIME = "select oper_date as oper_date,moneytype,sum(money) as money,count(order_id) as order_id  from order_sheet where order_type like :VORDER_TYPE and  buyer_cust_id like :VBUYER_CUST_ID and sale_cust_id like :VSALE_CUST_ID and moneytype like :VMONEYTYPE  and oper_date between :VSTART_DATE and  :VEND_DATE group by oper_date,moneytype order by oper_date desc";
  public static String order_sheet_SEL_ALL_ORDER_INFO_GROUP_ZHOU = "select DATE_FORMAT(oper_date,'%Y/%m') as oper_date, WEEK(oper_date,2) as weeker,moneytype,sum(money) as money,count(order_id) as order_id  from order_sheet where order_type like :VORDER_TYPE and  buyer_cust_id like :VBUYER_CUST_ID and sale_cust_id like :VSALE_CUST_ID and moneytype like :VMONEYTYPE  group by oper_date,moneytype,date_format(oper_date,'%Y-%m') order by oper_date";
  public static String order_sheet_SEL_ALL_ORDER_INFO_GROUP_ZHOU_TIME = "select DATE_FORMAT(oper_date,'%Y/%m') as oper_date, WEEK(oper_date,2) as weeker,moneytype,sum(money) as money,count(order_id) as order_id  from order_sheet where order_type like :VORDER_TYPE and  buyer_cust_id like :VBUYER_CUST_ID and sale_cust_id like :VSALE_CUST_ID and moneytype like :VMONEYTYPE  and oper_date between :VSTART_DATE and  :VEND_DATE group by oper_date,moneytype,date_format(oper_date,'%Y-%m') order by oper_date desc";
  public static String order_sheet_SEL_ALL_ORDER_INFO_MM = "select date_format(oper_date,'%Y-%m') as oper_date,moneytype,sum(money) as money,count(order_id) as order_id  from order_sheet where order_type like :VORDER_TYPE and  buyer_cust_id like :VBUYER_CUST_ID and sale_cust_id like :VSALE_CUST_ID and moneytype like :VMONEYTYPE  group by   date_format(oper_date,'%Y-%m'),moneytype order by oper_date desc";
  public static String order_sheet_SEL_ALL_ORDER_INFO_GROUP_MM_TIME = "select date_format(oper_date,'%Y-%m') as oper_date,moneytype,sum(money) as money,count(order_id) as order_id  from order_sheet where order_type like :VORDER_TYPE and  buyer_cust_id like :VBUYER_CUST_ID and sale_cust_id like :VSALE_CUST_ID and moneytype like :VMONEYTYPE  and oper_date between :VSTART_DATE and  :VEND_DATE group by date_format(oper_date,'%Y-%m'),moneytype order by oper_date desc";
  public static String order_sheet_SEL_ALL_ORDER_INFO_YYYY = "select date_format(oper_date,'%Y-%m') as oper_date,moneytype,sum(money) as money,count(order_id) as order_id  from order_sheet where order_type like :VORDER_TYPE and  buyer_cust_id like :VBUYER_CUST_ID and sale_cust_id like :VSALE_CUST_ID and moneytype like :VMONEYTYPE  group by date_format(oper_date,'%Y-%m'),moneytype order by oper_date desc";
  public static String order_sheet_SEL_ALL_ORDER_INFO_GROUP_YYYY_TIME = "select date_format(oper_date,'%Y-%m') as oper_date,moneytype,sum(money) as money,count(order_id) as order_id  from order_sheet where order_type like :VORDER_TYPE and  buyer_cust_id like :VBUYER_CUST_ID and sale_cust_id like :VSALE_CUST_ID and moneytype like :VMONEYTYPE  and oper_date between :VSTART_DATE and  :VEND_DATE group by date_format(oper_date,'%Y-%m'),moneytype order by oper_date desc";
  public static String order_list_SEL_GOODS_INFO_BY_TYPE_STATE = "select * from order_list where buyer_cust_id=:VBUYER_CUST_ID and state=:VSTATE and stock_type=:VSTOCK_TYPE";
  public static String order_list_SEL_GOODS_INFO_BY_TYPE_STATE_CLASS = "select cust_id,sum(stock_totle_price) as stock_totle_price from order_list where buyer_cust_id=:VBUYER_CUST_ID and state=:VSTATE and stock_type=:VSTOCK_TYPE group by cust_id";
  public static String order_list_SEL_PRODUCT_STOCK_ID = "select validity from product where product_id=:VSTOCK_ID";
  public static String order_list_SEL_CART_INFO_BY_ORDER_ID = "select trade_id,stock_id,order_id,stock_name,stock_num,stock_unit,stock_price,stock_totle_price,oper_user,oper_time,class_id from order_list where order_id=:VORDER_ID";
  public static String order_list_UPDATE_ORDER_LIST_NUM = "update order_list set stock_num = stock_num + :VSTOCK_NUM ,stock_totle_price = (stock_totle_price + :VSTOCK_NUM * :VSTOCK_PRICE) where stock_id = :VSTOCK_ID";
  public static String order_list_INS_GOODS_TO_CART_INFO = "insert into order_list (trade_id,stock_id,stock_name,stock_num,stock_unit,stock_price,stock_totle_price,oper_user,oper_time) values(:VTRADE_ID,:VSTOCK_ID,:VSTOCK_NAME,:VSTOCK_NUM,:VSTOCK_UNIT,:VSTOCK_PRICE,:VSTOCK_TOTLE_PRICE,:VOPER_USER,now())";
  public static String order_list_SEL_GOODS_TO_CART_INFO = "select trade_id,order_id,cust_id,stock_id,stock_name,stock_num,stock_unit,moneytype,stock_price,stock_totle_price,state,oper_user,oper_time,stock_type,class_id,buyer_cust_id from order_list where buyer_cust_id = :VCUST_ID and state='0' and stock_type = :VSTOCK_TYPE";
  public static String order_list_DEL_GOODS_TO_CART_INFO = "delete from order_list where trade_id=:VTRADE_ID";
  public static String order_list_UPD_CART_INFO_STOCK_NUM_BY_ID = "update order_list set stock_num=:VSTOCK_NUM,stock_totle_price=:VSTOCK_TOTLE_PRICE where trade_id=:VTRADE_ID";
  public static String order_list_UPD_ORDER_LIST = "update order_list set order_id=:VORDER_ID,state='2' where trade_id=:VTRADE_ID";
  public static String order_list_SEL_CART_BY_BUYER_ID_STOCK_ID = "select trade_id,cust_id,stock_id,stock_type,stock_name,class_id,stock_num,stock_unit,moneytype,stock_price,stock_totle_price,state,buyer_cust_id,oper_user,add_date,oper_time from order_list where buyer_cust_id=:VBUYER_CUST_ID and stock_id=:VSTOCK_ID and state='1'";
  public static String order_list_UPDATE_GOODS_NUM_BY_BUYER_ID_STOCK_ID = "update order_list set stock_num=stock_num+1,stock_totle_price=stock_totle_price+:VSTOCK_PRICE,oper_time=now() where buyer_cust_id=:VBUYER_CUST_ID and stock_id=:VSTOCK_ID";
  public static String order_list_INS_CART_ALL = "insert into order_list(trade_id,cust_id,stock_id,stock_type,stock_name,class_id,stock_num,stock_unit,moneytype,stock_price,stock_totle_price,state,buyer_cust_id,oper_user,add_date,oper_time) values(:VTRADE_ID,:VCUST_ID,:VSTOCK_ID,:VSTOCK_TYPE,:VSTOCK_NAME,:VCLASS_ID,:VSTOCK_NUM,:VSTOCK_UNIT,:VMONEYTYPE,:VSTOCK_PRICE,:VSTOCK_TOTLE_PRICE,:VSTATE,:VBUYER_CUST_ID,:VOPER_USER,now(),now())";
  public static String order_sheet_SEL_Get_Hot_Sales_List = "select p.product_name,p.small_img,p.mid_img,p.big_img,p.product_id,p.class_id,pc.list_rule,pc.article_rule,pc.store_path from product p,product_class pc where p.class_id=pc.class_id and p.product_id in (select ol.order_id from order_list ol group by ol.order_id)";
  public static String inquiry_INS_INQUIRY_INFO_ALL_EVERY = "insert into inquiry (trade_id,stock_id,title,product_num,content,cust_id,user_id,user_name,for_leave_id,for_leave_user,in_date,readed,attach_url,cust_name) values(:VTRADE_ID,:VSTOCK_ID,:VTITLE,:VPRODUCT_NUM,:VCONTENT,:VCUST_ID,:VUSER_ID,:VUSER_NAME,:VFOR_LEAVE_ID,:VFOR_LEAVE_USER,now(),'0',:VATTACH_URL,:VCUST_NAME)";
  public static String inquiry_GET_ONE_INQUIRY_INFO = "select title,attach_url from inquiry where trade_id=:VTRADE_ID";
  public static String inquiry_INS_INQUIRY_INFO_ALL = "insert into inquiry (trade_id,stock_id,title,product_price,content,cust_id,user_id,user_name,for_leave_id,for_leave_user,cellphone,phone,email,in_date,readed,pay_style,other_require,attach_url,for_cust_name,cust_name) values(:VTRADE_ID,:VSTOCK_ID,:VTITLE,:VPRODUCT_PRICE,:VCONTENT,:VCUST_ID,:VUSER_ID,:VUSER_NAME,:VFOR_LEAVE_ID,:VFOR_LEAVE_USER,:VCELLPHONE,:VPHONE,:VEMAIL,now(),'0',:VPAY_STYLE,:VOTHER_REQUIRE,:VATTACH_URL,:VFOR_CUST_NAME,:VCUST_NAME)";
  public static String inquiry_SEL_MESSAGENUM_BY_FOR_LEAVE_ID = "select * from inquiry where for_leave_id=:VFOR_LEAVE_ID and trade_id !=:VFOR_LEAVE_ID order by in_date desc";
  public static String inquiry_SEL_MESSAGENUM_BY_FOR_LEAVE = "select * from inquiry where for_leave_id=:VFOR_LEAVE_ID order by in_date desc";
  public static String inquiry_SEL_INQUIRY_INFO_BY_USER_ID = "select inq.* from inquiry inq where inq.comments_status!=2 and inq.cust_id=:VCUST_ID";
  public static String inquiry_SEL_INQUIRY_INFO_ALL_BY_USER_ID = "select * from inquiry where cust_id=:VCUST_ID or for_leave_user=:VCUST_ID order by in_date desc";
  public static String inquiry_SEL_INQUIRY_INFO_REPLY = "select inq.* ,com.cust_name,com.abbreviated from inquiry inq left join company com on inq.cust_id=com.cust_id where  inq.comments_status!=2 and trade_id=:VTRADE_ID";
  public static String inquiry_INS_INQUIRY_INFO_REPLY = "insert into inquiry (trade_id,stock_id,title,product_price,content,cust_id,user_id,user_name,for_leave_id,for_leave_user,in_date,readed,pay_style,other_require,attach_url,for_cust_name,cust_name) values(:VTRADE_ID,:VSTOCK_ID,:VTITLE,:VPRODUCT_PRICE,:VCONTENT,:VCUST_ID,:VUSER_ID,:VUSER_NAME,:VFOR_LEAVE_ID,:VFOR_LEAVE_USER,now(),'0',:VPAY_STYLE,:VOTHER_REQUIRE,:VATTACH_URL,:VFOR_CUST_NAME,:VCUST_NAME)";
  public static String inquiry_DEL_BATTCH_DELETE_BY_ID = "update inquiry set comments_status=2 where  trade_id=:VTRADE_ID";
  public static String inquiry_UPD_INQUIRY_INFO_BY_TRADE_ID = "update inquiry inq set inq.readed = 1 where inq.trade_id=:VTRADE_ID";
  public static String inquiry_SEL_INQUIRY_INFO_BY_TRADE_ID = "select trade_id,title,product_num,product_price,email,cellphone,phone,content,stock_id,cust_id,user_id,for_leave_id,for_leave_user,in_date from inquiry where trade_id=:VTRADE_ID";
  public static String inquiry_SEL_MESSAGENUM_BY_ID = "select * from inquiry where trade_id = :VTRADE_ID";
  public static String inquiry_SEL_MESSAGENUM_KEY_OFF = "select * from inquiry where cust_id = :VCUST_ID and title like :VKEY order by in_date desc";
  public static String inquiry_SEL_MESSAGENUM_CUSTID_REPLY_KEY_OFF = "select * from inquiry where cust_id = :VCUST_ID and title like :VKEY and for_leave_user=:VTEMP_CUST_ID and readed=:VREPLY order by in_date desc";
  public static String inquiry_SEL_MESSAGENUM_CUSTID_KEY_OFF = "select * from inquiry where cust_id = :VCUST_ID and title like :VKEY and for_leave_user=:VTEMP_CUST_ID order by in_date desc";
  public static String inquiry_SEL_MESSAGENUM_KEY_ACC = "select * from inquiry where for_leave_user = :VCUST_ID and cust_id != :VCUST_ID and title like :VKEY order by in_date desc";
  public static String inquiry_SEL_MESSAGENUM_REPLY_KEY_ACC = "select * from inquiry where for_leave_user = :VCUST_ID and cust_id != :VCUST_ID and title like :VKEY and readed=:VREPLY order by in_date desc";
  public static String inquiry_SEL_MESSAGENUM_CUSTID_REPLY_KEY_ACC = "select * from inquiry where for_leave_user = :VCUST_ID and cust_id!=:VCUST_ID and title like :VKEY and cust_id=:VTEMP_CUST_ID and readed=:VREPLY order by in_date desc";
  public static String inquiry_SEL_MESSAGENUM_CUSTID_KEY_ACC = "select * from inquiry where for_leave_user = :VCUST_ID and cust_id!=:VCUST_ID and title like :VKEY and cust_id=:VTEMP_CUST_ID order by in_date desc";
  public static String inquiry_SEL_MESSAGENUM_REPLY_KEY_OFF = "select * from inquiry where cust_id = :VCUST_ID and title like :VKEY and readed=:VREPLY order by in_date desc";
  public static String company_UPDATE_BY_ADMIN_CUST = "update company set cust_name=:VCUST_NAME,company_address=:VCOMPANY_ADDRESS,email=:VEMAIL,group_contact_phone=:VGROUP_CONTACT_PHONE,fax_nbr=:VFAX_NBR,company_scope=:VCOMPANY_SCOPE where cust_id=:VCUST_ID";
  public static String company_SEL_COMMEND_CUST = "SELECT b.cust_name,b.cust_id,b.class_id,b.logo_img,ai.area_name FROM (SELECT b.cust_name,b.cust_id,b.class_id,b.logo_img,b.eparchy_code  FROM company b WHERE b.display=1 AND b.cust_state =1 AND b.cust_type!='0'  AND b.class_id LIKE '100%' AND b.commend=1 ORDER BY  b.add_date DESC  LIMIT 0,9) b INNER JOIN user_info u ON b.cust_id=u.cust_id LEFT JOIN area_info ai ON SUBSTR(b.eparchy_code,1,6)=ai.area_id ";
  public static String company_SEL_NEWS_SCORE_BY_CUST_ID = "select l.level_id,c.cust_name,u.user_id,l.level_name,l.news_score score from company c,company_level l,user_info u where c.level_id = l.level_id and c.cust_id=u.cust_id and c.cust_id = :VCUST_ID group by u.user_id";
  public static String company_SEL_BUYING_SCORE_BY_CUST_ID = "select l.level_id,c.cust_name,u.user_id,l.level_name,l.buying_score score from company c,company_level l,user_info u where c.level_id = l.level_id and c.cust_id=u.cust_id and c.cust_id = :VCUST_ID group by u.user_id";
  public static String company_SEL_PRODUCT_SCORE_BY_CUST_ID = "select l.level_id,c.cust_name,u.user_id,l.level_name,l.product_score score from company c,company_level l,user_info u where c.level_id = l.level_id and c.cust_id=u.cust_id and c.cust_id = :VCUST_ID group by u.user_id";
  public static String company_SEL_STOCK_SCORE_BY_CUST_ID = "select l.level_id,c.cust_name,u.user_id,l.level_name,l.stock_score score from company c,company_level l,user_info u where c.level_id = l.level_id and c.cust_id=u.cust_id and c.cust_id = :VCUST_ID group by u.user_id";
  public static String company_SEL_SEALS_SCORE_BY_CUST_ID = "select l.level_id,c.cust_name,u.user_id,l.level_name,l.sales_score score from company c,company_level l,user_info u where c.level_id = l.level_id and c.cust_id=u.cust_id and c.cust_id = :VCUST_ID group by u.user_id";
  public static String company_SEL_COMPANY_LEVEL_INFO_BY_CUST_ID = "select level_id from company where cust_id=:VCUST_ID";
  public static String company_UPDATE_INFOAUTH_FOUR = "update company set info_auth='3',oper_user=:VOPER_USER,oper_time=now() where cust_id=:VCUST_ID";
  public static String company_GET_COMPANY_LEVEL = "select level_id,level_name from company where cust_id = :VCUST_ID";
  public static String company_GET_CUST_NAME_BY_ID = "select cust_name from company where cust_id = :VCUST_ID";
  public static String company_SEL_BY_CHECK_NAME = "select * from company where cust_name =:VCUST_NAME  order by add_date desc";
  public static String company_COMPANY_FREE_IN = "insert into company(cust_id,cust_name,cust_type,cust_state,eparchy_code,enterprise_type_code,commend,display,fax_nbr,group_attr,develope_channel,company_address,group_memo,group_contact_phone,add_date)values (:VCUST_ID,:VCUST_NAME,:VCUST_TYPE,:VCUST_STATE,:VEPARCHY_CODE,:VENTERPRISE_TYPE_CODE,:VCOMMEND,:VDISPLAY,:VFAX_NBR,:VGROUP_ATTR,:VDEVELOPE_CHANNEL,:VCOMPANY_ADDRESS,:VGROUP_MEMO,:VGROUP_CONTACT_PHONE,now())";
  public static String company_SEL_SPEC_CUST = "select * from company where cust_id=:VCUST_ID";
  public static String company_SEL_SPEC_CUST2 = "select contact_name from user_info where cust_id=:VCUST_ID";
  public static String company_SEL_COMPANY_BY_PROVINCE = "select cust_id,account_id,cust_name,cust_aim from company where province like :VPROVINCE";
  public static String company_SEL_COMPANY_BY_CITY = "select cust_id,account_id,cust_name,cust_aim from company where eparchy_code like :VEPARCHY_CODE and display=1 and cust_state=1 order by check_time desc";
  public static String company_SEL_COMPANYNUM_BY_CITY = "select cust_id,account_id,cust_name,cust_aim from company where eparchy_code like :VEPARCHY_CODE";
  public static String company_GET_CUSTNAME_BY_CUSTID = "SELECT CUST_NAME FROM COMPANY WHERE CUST_ID = :VCUST_ID";
  public static String company_UPDATE_COMPANYINFO_ALLDATA = "update company set logo_img=:VLOGO_IMG_SQL,cust_supply=:VCUST_SUPPLY_SQL,cust_buying=:VCUST_BUYING_SQL,register_attach=:VREGISTER_ATTACH_SQL,cust_name=:VCUST_NAME_SQL,juristic=:VJURISTIC_SQL,abbreviated=:VABBREVIATED_SQL,enterprise_type_code=:VENTERPRISE_TYPE_CODE_SQL,eparchy_code=:VEPARCHY_CODE_SQL,group_contact_phone=:VGROUP_CONTACT_PHONE_SQL,fax_nbr=:VFAX_NBR_SQL,website=:VWEBSITE_SQL,post_code=:VPOST_CODE_SQL,pspt_id=:VPSPT_ID_SQL,company_address=:VCOMPANY_ADDRESS_SQL,bank_deposit=:VBANK_DEPOSIT_SQL,bank_account=:VBANK_ACCOUNT_SQL,banking_account=:VBANKING_ACCOUNT_SQL,user_count=:VUSER_COUNT_SQL,certification=:VCERTIFICATION_SQL,cust_rage=:VCUST_RAGE_SQL,company_scope=:VCOMPANY_SCOPE_SQL,email=:VEMAIL_SQL,type=:VTYPE where cust_id=:VCUST_ID";
  public static String company_SEL_CUSTID_BY_CUSTSTATE = "select cust_id,cust_rage,add_date,cust_name,info_auth from company where cust_state='0' and cust_type='1' order by add_date ";
  public static String company_SEL_COMPANY_INFO_BY_CUSTSTATE_NOT_NINE = "select cust_id,cust_name,eparchy_code,cust_rage,info_auth,cust_state,level_id,level_name,commend,auth_date from company where cust_state not in ('9') and cust_type not in ('0') order by cust_id desc";
  public static String company_UPDATE_COMPANY_AUTH_NOTFILL_CUSTSTATEOK = "update company a set a.cust_state='1',a.auto_state=:VAUTO_STATE,a.dis_state=:VDIS_STATE,a.back_reason=:VBACK_REASON,a.check_time=now(),a.check_user=:VSESSION_USER_ID where a.cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_AUTH_NOTFILL_CUSTSTATEPASS = "update company a set a.cust_state='2',a.auto_state=:VAUTO_STATE,a.dis_state=:VDIS_STATE,a.back_reason=:VBACK_REASON,a.check_time=now(),a.check_user=:VSESSION_USER_ID where a.cust_id=:VCUST_ID";
  public static String company_UPDATE_USERINFO_AUTH_NOTFILL_CUSTSTATEPASS = "update user_info set user_state='2' where cust_id=:VCUST_ID and user_id=:VUSER_ID";
  public static String company_SEL_COMPANY_LIST_BY_CUSTNAME = "select cust_id,cust_name,eparchy_code,cust_rage,info_auth,cust_state,level_id,level_name,commend,auth_date from company where cust_state != '9' and cust_type != '0' and cust_name like :VKEYWORD and auth_date>=:VSTART and auth_date<=:VEND and commend like :VTUIJIAN and auto_state like :VAUTOSHENHE and eparchy_code like :VCOUNTRYID and cust_type like :VLEIXING and (instr(:VSUODINGZHUXIAO,cust_state)>0) and level_id like :VCOMLEVELINFO_LEVEL_ID and (cust_supply like :VPRODECTCLASS_CLASS_ID or (:VPRODECTCLASS_CLASS_ID ='%')) and (info_auth like :VSELECTFOUR or (:VSELECTFOUR ='%')) order by cust_id desc";
  public static String company_SEL_COMPANY_LIST_BY_CUSTNAME_NULL = "select cust_id,cust_name,eparchy_code,cust_rage,info_auth,cust_state,level_id,level_name,commend,auth_date from company where cust_state != '9' and cust_type != '0' and cust_name like :VKEYWORD and auth_date>=:VSTART and auth_date<=:VEND and commend like :VTUIJIAN and list_top like :VLIST_TOP and auto_state like :VAUTOSHENHE and eparchy_code like :VCOUNTRYID and cust_type like :VLEIXING and (instr(:VSUODINGZHUXIAO,cust_state)>0) and level_id like :VCOMLEVELINFO_LEVEL_ID and (cust_supply like :VPRODECTCLASS_CLASS_ID or (:VPRODECTCLASS_CLASS_ID ='%')) and info_auth is null order by cust_id desc";
  public static String company_SEL_COMPANY_INFO_BY_ZHANGHAO = "select a.cust_id,a.cust_name,a.eparchy_code,a.cust_rage,a.info_auth,a.cust_state,a.level_id,a.level_name,a.commend,a.auth_date,b.user_name,b.user_id from company a ,user_info b where a.cust_state not in ('9') and a.cust_type not in ('0') and a.cust_id=b.cust_id and b.user_name like :VZHANGHAO order by a.cust_id desc";
  public static String company_SEL_COMPANY_LIST_BY_CUSTNAME_NULL_A = "select cust_id,cust_name,eparchy_code,cust_rage,info_auth,cust_state,level_id,level_name,commend,auth_date from company where cust_state != '9' and cust_type != '0' and cust_name like :VKEYWORD and (auth_date>=:VSTART and auth_date<=:VEND or auth_date is null) and commend like :VTUIJIAN and list_top like :VLIST_TOP and auto_state like :VAUTOSHENHE and eparchy_code like :VCOUNTRYID and cust_type like :VLEIXING and (instr(:VSUODINGZHUXIAO,cust_state)>0) and level_id like :VCOMLEVELINFO_LEVEL_ID and (cust_supply like :VPRODECTCLASS_CLASS_ID or (:VPRODECTCLASS_CLASS_ID ='%')) and info_auth is null order by cust_id desc";
  public static String company_SEL_COMPANY_LIST_BY_CUSTNAME_B = "select cust_id,cust_name,eparchy_code,cust_rage,info_auth,cust_state,level_id,level_name,commend,auth_date from company where cust_state != '9' and cust_type != '0' and cust_name like :VKEYWORD and (auth_date>=:VSTART and auth_date<=:VEND or auth_date is null) and commend like :VTUIJIAN and list_top like :VLIST_TOP and auto_state like :VAUTOSHENHE and eparchy_code like :VCOUNTRYID and cust_type like :VLEIXING and (instr(:VSUODINGZHUXIAO,cust_state)>0) and level_id like :VCOMLEVELINFO_LEVEL_ID and (cust_supply like :VPRODECTCLASS_CLASS_ID or (:VPRODECTCLASS_CLASS_ID ='%')) and (info_auth like :VSELECTFOUR or (:VSELECTFOUR ='%')) order by cust_id desc";
  public static String company_SEL_COMPANY_LIST_BY_CUSTNAME_C = "select cust_id,cust_name,eparchy_code,cust_rage,info_auth,cust_state,level_id,level_name,commend,auth_date from company where cust_state != '9' and cust_type != '0' and cust_name like :VKEYWORD and auth_date>=:VSTART and auth_date<=:VEND and commend like :VTUIJIAN and list_top like :VLIST_TOP and auto_state like :VAUTOSHENHE and eparchy_code like :VCOUNTRYID and cust_type like :VLEIXING and (instr(:VSUODINGZHUXIAO,cust_state)>0) and level_id like :VCOMLEVELINFO_LEVEL_ID and (cust_supply like :VPRODECTCLASS_CLASS_ID or (:VPRODECTCLASS_CLASS_ID ='%')) and (info_auth like :VSELECTFOUR or (:VSELECTFOUR ='%')) order by cust_id desc";
  public static String site_parameter_GET_AUTH_ROLE_ID_BY = "select param_value from site_parameter where param_name = 'default_role' ";
  public static String score_parameter_GET_SCORE_PARAM_BY_LEVEL_MODEL = "select score_param,score_param_id from score_parameter where score_model_id=:VSCORE_MODEL_ID and level_id = :VLEVEL_ID";
  public static String score_parameter_IF_EXIST_BY_MODEL_LEVEL = "select score_param_id from score_parameter where score_model_id = :VSCORE_MODEL_ID and level_id = :VLEVEL_ID";
  public static String score_parameter_INS_SCORE_PARAM_INFO_BY_ALL = "insert into score_parameter(score_param_id,score_model_id,score_model_name,score_param,level_id,level_name,score_model_comment,oper_user,oper_time,add_date,checked) values (:VSCORE_PARAM_ID,:VSCORE_MODEL_ID,:VSCORE_MODEL_NAME,:VSCORE_PARAM,:VLEVEL_ID,:VLEVEL_NAME,:VSCORE_MODEL_COMMENT,:VOPER_USER,now(),now(),'1')";
  public static String score_parameter_GET_ALL_SCORE_PARAM_INFOS = "select score_param_id,score_model_id,score_model_name,score_param,level_id,level_name,score_model_comment,oper_user from score_parameter";
  public static String score_parameter_DEL_BY_SCORE_PARAM_ID = "delete from score_parameter where score_param_id = :VSCORE_PARAM_ID";
  public static String score_parameter_GET_SCORE_PARAM_BY_ID = "select score_model_id,score_model_name,score_param,level_id,level_name,score_model_comment,remove_tag from score_parameter where score_param_id = :VSCORE_PARAM_ID";
  public static String score_parameter_UPDATE_SCORE_PARAM_INFO_BY_ID = "update score_parameter set score_param_id = :VSCORE_PARAM_ID,score_model_id = :VSCORE_MODEL_ID,score_model_name=:VSCORE_MODEL_NAME, score_param = :VSCORE_PARAM,level_id=:VLEVEL_ID,level_name=:VLEVEL_NAME,score_model_comment=:VSCORE_MODEL_COMMENT,oper_user=:VOPER_USER,remove_tag=:VREMOVE_TAG where score_param_id = :VSCORE_PARAM_ID";
  public static String role_GET_ROLE_NAME_BY_ID_NAD_PATH = "select role_id from role where role_auth_id = :VROLE_AUTH_ID and menu_path = :VMENU_PATH";
  public static String user_info_GET_AOLE_AUTH_ID_BY_USER_ID = "select role_auth_id from user_info where user_id = :VUSER_ID";
  public static String user_info_INS_AUTHORITY_INFO_BY_ALL = "update user_info set role_auth_id = :VROLE_AUTH_ID where user_id = :VUSER_ID";
  public static String authority_SEL_AUTHORITY_BY = "select menu_name from authority where user_id = :VUSER_ID and menu_id = :VMENU_ID";
  public static String authority_GET_ALL_AUTHORITY_INFO = "select a.auth_id,a.menu_id,a.menu_name,a.menu_path,a.cust_id,a.user_id,a.role_name,c.cust_name from authority a ,company c where a.cust_id = c.cust_id order by a.oper_time desc";
  public static String user_info_GET_ROLE_NAME_BY_ID_KEY = "select u.user_id,u.user_name,u.cust_name,u.role_auth_id,u.user_type,c.cust_type,r.role_name,r.role_type from user_info u,role r,company c where u.role_auth_id = r.role_auth_id and u.user_name like :VKEYWORD group by u.user_name ";
  public static String authority_GET_ALL_AUTHORITY_INFO_KEY = "select a.auth_id,a.menu_id,a.menu_name,a.menu_path,a.cust_id,a.user_id,a.role_name,c.cust_name from authority a ,company c where a.cust_id = c.cust_id and c.cust_name like :VKEYWORD";
  public static String user_info_GET_ROLE_NAME_BY_ID = "select u.user_id,u.user_name,u.cust_name,u.role_auth_id,u.user_type,c.cust_type,r.role_name,r.role_type from user_info u,role r,company c where u.role_auth_id = r.role_auth_id and c.cust_id = u.cust_id group by u.user_name ";
  public static String authority_DEL_BY_AUTHORITY_ID = "delete from authority where auth_id = :VMENU_ID";
  public static String authority_SEL_MAX_AUTH_ID_GROUP_BY = "select max(auth_id) from authority group by menu_id,menu_path,user_id";
  public static String authority_GET_AUTHORITY_BY_USERID_PATH = "select auth_id from authority where user_id = :VUSER_ID and menu_path = :VMENU_PATH";
  public static String authority_GET_AUTHORITY_BY_CUST_ID = "select a.auth_id,a.menu_id,a.menu_name,a.menu_path,a.role_name,u.user_name,u.cust_name from authority a ,user_info u where a.user_id = u.user_id and a.user_id = :VCUST_ID";
  public static String authority_INSERT_ALL_USER_ROLE = "insert into authority(auth_id,menu_id,menu_name,menu_path,role_name,cust_id,user_id,oper_user,oper_time) values(:VAUTH_ID,:VMENU_ID,:VMENU_NAME,:VMENU_PATH,:VROLE_NAME,:VCUST_ID,:VUSER_ID,:VOPER_USER,now())";
  public static String authority_INSERT_AUTHORITY_FOR_COMPANY = "insert into authority (auth_id, menu_id, menu_name, menu_path, cust_id, user_id, checked, check_user, check_time, oper_user, oper_time, auth_start_date, auth_end_date, rsrv_str1, rsrv_str2, rsrv_str3, rsrv_str4, rsrv_str5, rsrv_str6, rsrv_str7, rsrv_str8, rsrv_str9, rsrv_str10, role_name) values(:VAUTH_ID,:VMENU_ID,:VMENU_NAME,:VMENU_PATH,:VCUST_ID,:VUSER_ID,'1',NULL,NULL,:VOPER_USER,now(),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,:VROLE_NAME)";
  public static String authority_GET_USER_INFO_BY_ROLE_ANME = "select cust_id,user_id from authority where role_name = :VROLE_NAME group by user_id";
  public static String authority_DELETE_AUTHORITY = "delete from authority where menu_id = :VMENU_ID";
  public static String authority_GET_CUST_USER_BY_ROLE_NAME = "select cust_id,user_id from authority where role_name = :VROLE_NAME group by cust_id ";
  public static String user_info_UPDATE_ONE_BY_ID = "update user_info set contact_name=:VCONTACT_NAME where cust_id=:VUSER_ID";
  public static String user_info_GET_COMPANYINFO_LIST = "select u.user_id,u.user_name,u.cust_id,u.contact_name,u.cust_name,u.user_type,u.role_auth_id,c.cust_type from company c,user_info u where c.cust_id=u.cust_id and c.cust_type!='0'\tand u.user_type ='1' and u.user_state!='9' order by u.oper_time desc";
  public static String user_info_GET_COMPANYINFO_LIST_KEY = "select u.user_id,u.user_name,u.cust_id,u.contact_name,u.cust_name,u.user_type,u.role_auth_id,c.cust_type from company c,user_info u where c.cust_id=u.cust_id and c.cust_type!='0' and (u.user_type ='1' or u.user_type='2') and u.user_state!='9' and (u.user_name like :VKEYWORD or u.cust_name like :VKEYWORD or u.contact_name like :VKEYWORD) order by u.oper_time desc";
  public static String user_info_GET_USER_NAME_BY_ID = "select user_name from user_info where user_id = :VUSER_ID";
  public static String user_info_SEL_BY_CHECK = "select user_name from user_info where user_name = :VUSER_NAME";
  public static String user_info_SEL_BY_EMAIL = "select count(*) as ct from user_info where email =:VEMAIL";
  public static String user_info_INS_BY_ALL_USER = "insert into user_info(user_id,user_name,cust_id,cust_name,passwd,user_type,nickname,contact_name,sex,email,user_state,web_login_tag,phone,eparchy_code,add_date,oper_time,reg_date,oper_user,role_auth_id,cellphone,work_depart) values (:VUSER_ID,:VUSER_NAME,:VCUST_ID,:VCUST_NAME,:VPASSWD,:VUSER_TYPE,:VNICKNAME,:VCONTACT_NAME,:VSEX,:VEMAIL,:VUSER_STATE,:VWEB_LOGIN_TAG,:VGROUP_CONTACT_PHONE,:VEPARCHY_CODE,now(),now(),now(),:VUSER_ID,:VROLE_AUTH_ID,:VCELLPHONE,:VWORK_DEPART)";
  public static String user_info_COMPANY_FREE_IN = "insert into company(cust_id,cust_name,cust_type,cust_rage,cust_state,eparchy_code,list_top,commend,display,group_contact_phone,oper_user,email,oper_time,add_date,level_name,level_id,type) values (:VCUST_ID,:VCUST_NAME,:VCUST_TYPE,:VCUST_RAGE,:VCUST_STATE,:VEPARCHY_CODE,:VLIST_TOP,:VCOMMEND,:VDISPLAY,:VGROUP_CONTACT_PHONE,:VOPER_USER,:VEMAIL,now(),now(),:VCLASS_NAME,:VLEVEL_ID,:VRSRV_STR1)";
  public static String user_info_SEL_ADMINTYPE_BY_USERNAME = "select c.cust_type from company c, user_info u  where c.cust_id = u.cust_id and user_name=:VUSER_NAME";
  public static String user_info_SEL_BY_USERNAME = "select * from user_info  where user_name=? ";
  public static String user_info_SELECL_CHECK_IP_BY_USERNAME = "select ip,user_type from user_info  where user_name=:VUSER_NAME";
  public static String user_info_SEL_CUST_BY_USERNAME = "select u.*,c.* from user_info u,company c where u.user_name=:VUSER_NAME and c.cust_id=u.cust_id";
  public static String user_info_SEL_CUST_BY_ID = "select * from company where cust_id= ? ";
  
  public static String user_info_UPDATE_USERINFO_USEREMAIL_CELLPHONE = "update user_info set cellphone=:VCELLPHONE,useremail=:VUSEREMAIL where user_id=:VUSER_ID";
  public static String user_info_GET_USER_EMAIL_BU_USER_ID = "SELECT EMAIL FROM USER_INFO WHERE USER_ID = :VUSER_ID";
  public static String user_info_UPDATE_USERINFO_BY_PASSWORD = "update user_info set passwd=:VLASTPWD where user_id=:VUSER_ID";
  public static String user_info_INS_USER_INFO_BY_ALL = "INSERT INTO USER_INFO(USER_ID,USER_NAME,CUST_ID,CUST_NAME,USER_STATE,PASSWD,USER_TYPE,EPARCHY_CODE,REG_DATE,PHONE,CELLPHONE,EMAIL,CONTACT_NAME,OPER_USER,OPER_TIME,REMARK,ADD_DATE) values(:VUSER_ID,:VUSER_NAME,:VCUST_ID,:VCUST_NAME,:VUSER_STATE,:VPASSWD,:VUSER_TYPE,'10010110001000010000',now(),:VPHONE,:VCELLPHONE,:VEMAIL,:VCONTACT_NAME,:VOPER_USER,now(),:VREMARK,now())";
  public static String user_info_INS_USER_INFO_BY_ALL_ACCOUNT = "INSERT INTO USER_INFO(USER_ID,USER_NAME,CUST_ID,CUST_NAME,USER_STATE,PASSWD,USER_TYPE,EPARCHY_CODE,REG_DATE,PHONE,CELLPHONE,EMAIL,CONTACT_NAME,OPER_USER,OPER_TIME,REMARK,ADD_DATE,IP,ROLE_AUTH_ID) values(:VUSER_ID,:VUSER_NAME,:VCUST_ID,:VCUST_NAME,:VUSER_STATE,:VPASSWD,:VUSER_TYPE,'10010110001000010000',now(),:VPHONE,:VCELLPHONE,:VEMAIL,:VCONTACT_NAME,:VOPER_USER,now(),:VREMARK,now(),:VRSRV_STR2,:VROLE_AUTH_ID)";
  public static String user_info_GET_All_ACCOUNT_INFO = "select u.user_id,u.user_name,u.user_type,u.user_state,u.contact_name,u.role_auth_id from user_info u where u.cust_id = :VCUST_ID and u.user_state != '9' group by user_id order by u.add_date desc";
  public static String user_info_GET_ONE_ACCOUNT_INFO = "select u.user_name,u.user_state,u.passwd,u.user_type,u.phone,u.cellphone,u.email,u.contact_name,u.remark,u.ip,u.role_auth_id,r.role_name from user_info u, role r  where u.user_id = :VUSER_ID and r.role_auth_id = u.role_auth_id group by u.user_id ";
  public static String user_info_GET_ONE_ACCOUNT_INFO2 = "select u.user_name,u.user_state,u.passwd,u.user_type,u.phone,u.cellphone,u.email,u.contact_name,u.remark,u.ip,u.role_auth_id from user_info u where user_id = :VUSER_ID ";
  public static String user_info_UPDATE_USER_INFO_BY_ALL = "UPDATE USER_INFO set USER_STATE=:VUSER_STATE,USER_TYPE=:VUSER_TYPE,PHONE=:VPHONE,CELLPHONE=:VCELLPHONE,EMAIL=:VEMAIL,CONTACT_NAME=:VCONTACT_NAME,OPER_USER=:VOPER_USER,OPER_TIME=now(),REMARK=:VREMARK,IP=:VRSRV_STR2,ROLE_AUTH_ID=:VROLE_AUTH_ID WHERE USER_ID=:VUSER_ID";
  public static String user_info_UPDATE_USERINFO_STATE = "update user_info a set a.cust_name=:VCUST_NAME_SQL,a.role_auth_id=:VROLE_AUTH_ID,a.user_state='1',a.check_time=now(),a.check_user=:VSESSION_USER_ID,a.user_state_date=now() where a.user_id=:VUSER_ID";
  public static String user_info_UPDATE_USERINFO_STATE_TWO_BY_ID = "update user_info a set a.cust_name=:VCUST_NAME_SQL,a.user_state='2',a.check_time=now(),a.check_user=:VSESSION_USER_ID,a.user_state_date=now() where a.user_id=:VUSER_ID";
  public static String user_info_DELETE_ACCOUNT_BY_USER_ID = "update USER_INFO set USER_STATE = '9' where USER_ID = :VUSER_ID";
  public static String user_info_LOCK_ACCOUNT_BY_USER_ID = "update USER_INFO set USER_STATE = '4' where USER_ID = :VUSER_ID";
  public static String user_info_UNLOCK_ACCOUNT_BY_USER_ID = "update USER_INFO set USER_STATE = '1' where USER_ID = :VUSER_ID";
  public static String user_info_SEL_USERID_BY_CUSTID = "select user_id,user_name from user_info where cust_id=:VCUST_ID";
  public static String news_class_MOVE_NEWS_CLASS_BY_ID = "update news_class set class_id=:VCLASS_ID where class_id=:VUP_ID";
  public static String news_class_UPDATE_NEWS_BY_CLASS_ID = "update news set class_id=:VCLASS_ID where class_id=:VUP_ID";
  public static String news_class_SELECT_SON_BY_UP_INCLUDE_SELF = "select class_id,class_name from news_class where class_id like :VUP_ID";
  public static String news_class_SELECT_MAX_ID_BY_CLASS = "select max(class_id) as maxid from news_class where length(class_id)=:VLENGTH and class_id like :VUP_ID";
  public static String news_class_INS_BY_ALL_PRODUCT_CLASS = "insert into news_class(class_id,class_name,class_desc,remove_tag,oper_user,list_model,index_model,content_model,store_path,list_rule,home_name,article_rule,dyna_show,oper_time,range)values(:VCLASS_ID,:VCLASS_NAME,:VCLASS_DESC,:VREMOVE_TAG,:VOPER_USER,:VLIST_MODEL,:VINDEX_MODEL,:VCONTENT_MODEL,:VSTOCE_PATH,:VLIST_RULE,:VHOME_NAME,:VARTICLE_RULE,:VDYNA_SHOW,now(),:VRANGE)";
  public static String news_class_SELECT_MAXID = "SELECT MAX(class_id) as maxid FROM news_class WHERE LENGTH(class_id)=:VLENGTH AND class_id LIKE :VUP_ID";
  public static String news_class_SEL_ONE_BY_NONE = "SELECT MAX(class_id) as maxid FROM news_class WHERE LENGTH(class_id)=3";
  public static String news_class_SEL_BY_CLASSID = "SELECT * FROM news_class where class_id=:VCLASS_ID";
  public static String news_class_SEL_ALL_ONE_BY_NONE = "SELECT * FROM news_class WHERE LENGTH(class_id)=3 order by class_id";
  public static String news_class_SELECT_SON_BY_UP = "SELECT * FROM news_class WHERE LENGTH(class_id)=:VLENGTH AND class_id LIKE :VUP_ID order by class_id";
  public static String news_class_UPDATE_BY_ALL_NEWS_CLASS = "update news_class set class_name=:VCLASS_NAME,class_desc=:VCLASS_DESC,remove_tag=:VREMOVE_TAG,oper_user=:VOPER_USER,list_model=:VLIST_MODEL,index_model=:VINDEX_MODEL,content_model=:VCONTENT_MODEL,store_path=:VSTOCE_PATH,list_rule=:VLIST_RULE,home_name=:VHOME_NAME,article_rule=:VARTICLE_RULE,dyna_show=:VDYNA_SHOW,range=:VRANGE where class_id=:VCLASS_ID";
  public static String news_class_UPDATE_NEWS_CLASS_NAME_BY_CLASS_ID = "update news set class_name=:VCLASS_NAME where class_id=:VCLASS_ID";
  public static String news_class_DELETE_BY_ALL_PRODUCT_CLASS = "delete  FROM news_class where class_id=:VCLASS_ID";
  public static String news_class_SELECT_NEWS_BY_CLASS_ID = "select news_id from news where class_id=:VCLASS_ID";
  public static String expo_class_MOVE_EXPO_CLASS_BY_ID = "update expo_class set class_id=:VCLASS_ID where class_id=:VUP_ID";
  public static String expo_class_UPDATE_EXPO_LIST_BY_CLASS_ID = "update expo_list set class_id=:VCLASS_ID where class_id=:VUP_ID";
  public static String expo_class_SELECT_SON_BY_UP_INCLUDE_SELF = "select class_id,class_name from expo_class where class_id like :VUP_ID";
  public static String expo_class_SELECT_MAX_ID_BY_CLASS = "select max(class_id) as maxid from expo_class where length(class_id)=:VLENGTH and class_id like :VUP_ID";
  public static String expo_class_INS_BY_ALL_PRODUCT_CLASS = "insert into expo_class(class_id,class_name,class_desc,remove_tag,oper_user,list_model,index_model,content_model,store_path,list_rule,home_name,article_rule,dyna_show,oper_time)values(:VCLASS_ID,:VCLASS_NAME,:VCLASS_DESC,:VREMOVE_TAG,:VOPER_USER,:VLIST_MODEL,:VINDEX_MODEL,:VCONTENT_MODEL,:VSTOCE_PATH,:VLIST_RULE,:VHOME_NAME,:VARTICLE_RULE,:VDYNA_SHOW,now())";
  public static String expo_class_SELECT_MAXID = "SELECT MAX(class_id) as maxid FROM expo_class WHERE LENGTH(class_id)=:VLENGTH AND class_id LIKE :VUP_ID";
  public static String expo_class_SEL_ONE_BY_NONE = "SELECT MAX(class_id) as maxid FROM expo_class WHERE LENGTH(class_id)=3";
  public static String expo_class_SEL_BY_CLASSID = "SELECT * FROM expo_class where class_id=:VCLASS_ID";
  public static String expo_class_SEL_ALL_ONE_BY_NONE = "SELECT * FROM expo_class WHERE LENGTH(class_id)=3 order by class_id";
  public static String expo_class_SELECT_SON_BY_UP = "SELECT * FROM expo_class WHERE LENGTH(class_id)=:VLENGTH AND class_id LIKE :VUP_ID order by class_id";
  public static String expo_class_UPDATE_BY_ALL_EXPO_CLASS = "update expo_class set class_name=:VCLASS_NAME,class_desc=:VCLASS_DESC,remove_tag=:VREMOVE_TAG,oper_user=:VOPER_USER,list_model=:VLIST_MODEL,index_model=:VINDEX_MODEL,content_model=:VCONTENT_MODEL,store_path=:VSTOCE_PATH,list_rule=:VLIST_RULE,home_name=:VHOME_NAME,article_rule=:VARTICLE_RULE,dyna_show=:VDYNA_SHOW where class_id=:VCLASS_ID";
  public static String expo_class_UPDATE_EXPO_CLASS_NAME_BY_CLASS_ID = "update expo_list set expo_class_name=:VCLASS_NAME where class_id=:VCLASS_ID";
  public static String expo_class_DELETE_BY_ALL_PRODUCT_CLASS = "delete  FROM expo_class where class_id=:VCLASS_ID";
  public static String expo_class_SELECT_NEWS_BY_CLASS_ID = "select expo_id from expo_list where class_id=:VCLASS_ID";
  public static String buying_class_DELETE_ALL_BUYING_CLASS = "delete from buying_class";
  public static String buying_class_GET_ALL_BUYING_CLASS = "select class_name,class_id,class_desc,store_path,remove_tag,dyna_show from buying_class";
  public static String buying_class_MOVE_BUYING_CLASS_BY_ID = "update buying_class set class_id=:VCLASS_ID where class_id=:VUP_ID";
  public static String buying_class_UPDATE_BUYING_BY_CLASS_ID = "update buying set class_id=:VCLASS_ID where class_id=:VUP_ID";
  public static String buying_class_SELECT_SON_BY_UP_INCLUDE_SELF = "select class_id,class_name from buying_class where class_id like :VUP_ID";
  public static String buying_class_SELECT_MAX_ID_BY_CLASS = "select max(class_id) as maxid from buying_class where length(class_id)=:VLENGTH and class_id like :VUP_ID";
  public static String buying_class_INS_BY_ALL_PRODUCT_CLASS = "insert into buying_class(class_id,class_name,class_desc,remove_tag,oper_user,list_model,index_model,content_model,store_path,list_rule,home_name,article_rule,dyna_show,oper_time)values(:VCLASS_ID,:VCLASS_NAME,:VCLASS_DESC,:VREMOVE_TAG,:VOPER_USER,:VLIST_MODEL,:VINDEX_MODEL,:VCONTENT_MODEL,:VSTOCE_PATH,:VLIST_RULE,:VHOME_NAME,:VARTICLE_RULE,:VDYNA_SHOW,now())";
  public static String buying_class_SELECT_MAXID = "SELECT MAX(class_id) as maxid FROM buying_class WHERE LENGTH(class_id)=:VLENGTH AND class_id LIKE :VUP_ID";
  public static String buying_class_SEL_ONE_BY_NONE = "SELECT MAX(class_id) as maxid FROM buying_class WHERE LENGTH(class_id)=3";
  public static String buying_class_SEL_BY_CLASSID = "SELECT * FROM buying_class where class_id=:VCLASS_ID";
  public static String buying_class_SEL_ALL_ONE_BY_NONE = "SELECT * FROM buying_class WHERE LENGTH(class_id)=3 order by class_id";
  public static String buying_class_SELECT_SON_BY_UP = "SELECT * FROM buying_class WHERE LENGTH(class_id)=:VLENGTH AND class_id LIKE :VUP_ID order by class_id";
  public static String buying_class_UPDATE_BY_ALL_BUYING_CLASS = "update buying_class set class_name=:VCLASS_NAME,class_desc=:VCLASS_DESC,remove_tag=:VREMOVE_TAG,oper_user=:VOPER_USER,list_model=:VLIST_MODEL,index_model=:VINDEX_MODEL,content_model=:VCONTENT_MODEL,store_path=:VSTOCE_PATH,list_rule=:VLIST_RULE,home_name=:VHOME_NAME,article_rule=:VARTICLE_RULE,dyna_show=:VDYNA_SHOW where class_id=:VCLASS_ID";
  public static String buying_class_UPDATE_BUYING_CLASS_NAME_BY_CLASS_ID = "update buying set class_name=:VCLASS_NAME where class_id=:VCLASS_ID";
  public static String buying_class_DELETE_BY_ALL_PRODUCT_CLASS = "delete  FROM buying_class where class_id=:VCLASS_ID";
  public static String buying_class_SELECT_BUYING_BY_CLASS_ID = "select buying_id from buying where class_id=:VCLASS_ID";
  public static String buying_class_SEL_BUYINGCLASS_INFO = "SELECT CLASS_ID,CLASS_NAME FROM BUYING_CLASS WHERE CLASS_ID > 1000 ORDER BY CLASS_ID";
  public static String buying_class_SEL_BUYINGCLASS_NAME_INFO = "SELECT CLASS_NAME FROM BUYING_CLASS WHERE CLASS_ID = :VCLASS_ID";
  public static String sales_class_DELETE_ALL_SALES_CLASS = "delete from sales_class";
  public static String sales_class_GET_ALL_SALES_CLASS = "select class_name,class_id,class_desc,store_path,remove_tag,dyna_show from sales_class";
  public static String sales_class_MOVE_SALES_CLASS_BY_ID = "update sales_class set class_id=:VCLASS_ID where class_id=:VUP_ID";
  public static String sales_class_UPDATE_SALES_BY_CLASS_ID = "update sales set class_id=:VCLASS_ID where class_id=:VUP_ID";
  public static String sales_class_SELECT_SON_BY_UP_INCLUDE_SELF = "select class_id,class_name from sales_class where class_id like :VUP_ID";
  public static String sales_class_SELECT_MAX_ID_BY_CLASS = "select max(class_id) as maxid from sales_class where length(class_id)=:VLENGTH and class_id like :VUP_ID";
  public static String sales_class_INS_BY_ALL_PRODUCT_CLASS = "insert into sales_class(class_id,class_name,class_desc,remove_tag,oper_user,list_model,index_model,content_model,store_path,list_rule,home_name,article_rule,dyna_show,oper_time)values(:VCLASS_ID,:VCLASS_NAME,:VCLASS_DESC,:VREMOVE_TAG,:VOPER_USER,:VLIST_MODEL,:VINDEX_MODEL,:VCONTENT_MODEL,:VSTOCE_PATH,:VLIST_RULE,:VHOME_NAME,:VARTICLE_RULE,:VDYNA_SHOW,now())";
  public static String sales_class_SELECT_MAXID = "SELECT MAX(class_id) as maxid FROM sales_class WHERE LENGTH(class_id)=:VLENGTH AND class_id LIKE :VUP_ID";
  public static String sales_class_SEL_ONE_BY_NONE = "SELECT MAX(class_id) as maxid FROM sales_class WHERE LENGTH(class_id)=3";
  public static String sales_class_SEL_BY_CLASSID = "SELECT * FROM sales_class where class_id=:VCLASS_ID";
  public static String sales_class_SEL_ALL_ONE_BY_NONE = "SELECT * FROM sales_class WHERE LENGTH(class_id)=3 order by class_id";
  public static String sales_class_SELECT_SON_BY_UP = "SELECT * FROM sales_class WHERE LENGTH(class_id)=:VLENGTH AND class_id LIKE :VUP_ID order by class_id";
  public static String sales_class_UPDATE_BY_ALL_SALES_CLASS = "update sales_class set class_name=:VCLASS_NAME,class_desc=:VCLASS_DESC,remove_tag=:VREMOVE_TAG,oper_user=:VOPER_USER,list_model=:VLIST_MODEL,index_model=:VINDEX_MODEL,content_model=:VCONTENT_MODEL,store_path=:VSTOCE_PATH,list_rule=:VLIST_RULE,home_name=:VHOME_NAME,article_rule=:VARTICLE_RULE,dyna_show=:VDYNA_SHOW where class_id=:VCLASS_ID";
  public static String sales_class_UPDATE_SALES_CLASS_NAME_BY_CLASS_ID = "update sales set class_name=:VCLASS_NAME where class_id=:VCLASS_ID";
  public static String sales_class_DELETE_BY_ALL_PRODUCT_CLASS = "delete  FROM sales_class where class_id=:VCLASS_ID";
  public static String sales_class_SELECT_SALES_BY_CLASS_ID = "select sales_id from sales where class_id=:VCLASS_ID";
  public static String sales_class_SEL_SALESCLASS_INFO = "SELECT CLASS_ID,CLASS_NAME FROM SALES_CLASS WHERE CLASS_ID > 1000 ORDER BY CLASS_ID";
  public static String sales_class_SEL_SALESCLASS_NAME_INFO = "SELECT CLASS_NAME FROM SALES_CLASS WHERE CLASS_ID = :VCLASS_ID";
  public static String tender_class_DELETE_ALL_SALES_CLASS = "delete from tender_class";
  public static String tender_class_GET_ALL_SALES_CLASS = "select class_name,class_id,class_desc,store_path,remove_tag,dyna_show from tender_class";
  public static String tender_class_MOVE_SALES_CLASS_BY_ID = "update tender_class set class_id=:VCLASS_ID where class_id=:VUP_ID";
  public static String tender_class_UPDATE_SALES_BY_CLASS_ID = "update sales set class_id=:VCLASS_ID where class_id=:VUP_ID";
  public static String tender_class_SELECT_SON_BY_UP_INCLUDE_SELF = "select class_id,class_name from tender_class where class_id like :VUP_ID";
  public static String tender_class_SELECT_MAX_ID_BY_CLASS = "select max(class_id) as maxid from tender_class where length(class_id)=:VLENGTH and class_id like :VUP_ID";
  public static String tender_class_INS_BY_ALL_PRODUCT_CLASS = "insert into tender_class(class_id,class_name,class_desc,remove_tag,oper_user,list_model,index_model,content_model,store_path,list_rule,home_name,article_rule,dyna_show,oper_time)values(:VCLASS_ID,:VCLASS_NAME,:VCLASS_DESC,:VREMOVE_TAG,:VOPER_USER,:VLIST_MODEL,:VINDEX_MODEL,:VCONTENT_MODEL,:VSTOCE_PATH,:VLIST_RULE,:VHOME_NAME,:VARTICLE_RULE,:VDYNA_SHOW,now())";
  public static String tender_class_SELECT_MAXID = "SELECT MAX(class_id) as maxid FROM tender_class WHERE LENGTH(class_id)=:VLENGTH AND class_id LIKE :VUP_ID";
  public static String tender_class_SEL_ONE_BY_NONE = "SELECT MAX(class_id) as maxid FROM tender_class WHERE LENGTH(class_id)=3";
  public static String tender_class_SEL_BY_CLASSID = "SELECT * FROM tender_class where class_id=:VCLASS_ID";
  public static String tender_class_SEL_ALL_ONE_BY_NONE = "SELECT * FROM tender_class WHERE LENGTH(class_id)=3 order by class_id";
  public static String tender_class_SELECT_SON_BY_UP = "SELECT * FROM tender_class WHERE LENGTH(class_id)=:VLENGTH AND class_id LIKE :VUP_ID order by class_id";
  public static String tender_class_UPDATE_BY_ALL_SALES_CLASS = "update tender_class set class_name=:VCLASS_NAME,class_desc=:VCLASS_DESC,remove_tag=:VREMOVE_TAG,oper_user=:VOPER_USER,list_model=:VLIST_MODEL,index_model=:VINDEX_MODEL,content_model=:VCONTENT_MODEL,store_path=:VSTOCE_PATH,list_rule=:VLIST_RULE,home_name=:VHOME_NAME,article_rule=:VARTICLE_RULE,dyna_show=:VDYNA_SHOW where class_id=:VCLASS_ID";
  public static String tender_class_UPDATE_SALES_CLASS_NAME_BY_CLASS_ID = "update sales set class_name=:VCLASS_NAME where class_id=:VCLASS_ID";
  public static String tender_class_DELETE_BY_ALL_PRODUCT_CLASS = "delete  FROM tender_class where class_id=:VCLASS_ID";
  public static String tender_class_SELECT_SALES_BY_CLASS_ID = "select sales_id from sales where class_id=:VCLASS_ID";
  public static String tender_class_SEL_SALESCLASS_INFO = "SELECT CLASS_ID,CLASS_NAME FROM tender_class WHERE CLASS_ID > 1000 ORDER BY CLASS_ID";
  public static String tender_class_SEL_SALESCLASS_NAME_INFO = "SELECT CLASS_NAME FROM tender_class WHERE CLASS_ID = :VCLASS_ID";
  public static String product_class_GET_ALL_PRODUCT_CLASS = "select class_name,class_id,class_desc,store_path,remove_tag,dyna_show from product_class";
  public static String product_class_DELETE_ALL_PRODUCT_CLASS = "delete from product_class";
  public static String product_class_SELECT_SON_BY_UP_INCLUDE_SELF = "select class_id,class_name from product_class where class_id like :VUP_ID";
  public static String product_class_SELECT_MAX_ID_BY_CLASS = "select max(class_id) as maxid from product_class where length(class_id)=:VLENGTH and class_id like :VUP_ID";
  public static String product_class_MOVE_PRODUCT_CLASS_BY_ID = "update product_class set class_id=:VCLASS_ID where class_id=:VUP_ID";
  public static String product_class_UPDATE_PRODUCT_BY_CLASS_ID = "update product set class_id=:VCLASS_ID where class_id=:VUP_ID";
  public static String product_class_SELECT_ALL_PRODUCT_BY_UP_CLASS_ID = "select product_id,attach_id,class_id from product where class_id like :VUP_ID";
  public static String product_class_DELETE_PRODUCT_CLASS_BY_LIKE_CLASS_ID = "delete from product_class where class_id like :VCLASS_ID";
  public static String product_class_SEL_BY_SUN_CLASSID = "select class_id,class_name from product_class where class_id like :VCLASS_ID and length(class_id) = :VlENGTH";
  public static String product_class_INS_BY_ALL_PRODUCT_CLASS = "insert into product_class(class_id,class_name,class_desc,remove_tag,oper_user,list_model,index_model,content_model,store_path,list_rule,home_name,article_rule,dyna_show,oper_time)values(:VCLASS_ID,:VCLASS_NAME,:VCLASS_DESC,:VREMOVE_TAG,:VOPER_USER,:VLIST_MODEL,:VINDEX_MODEL,:VCONTENT_MODEL,:VSTOCE_PATH,:VLIST_RULE,:VHOME_NAME,:VARTICLE_RULE,:VDYNA_SHOW,now())";
  public static String product_class_SELECT_MAXID = "SELECT MAX(class_id) as maxid FROM product_class WHERE LENGTH(class_id)=:VLENGTH AND class_id LIKE :VUP_ID";
  public static String product_class_SEL_ONE_BY_NONE = "SELECT MAX(class_id) as maxid FROM product_class WHERE LENGTH(class_id)=3";
  public static String product_class_SEL_BY_CLASSID = "SELECT * FROM product_class where class_id=:VCLASS_ID";
  public static String product_class_SEL_ALL_ONE_BY_NONE = "SELECT * FROM product_class WHERE LENGTH(class_id)=3 AND REMOVE_TAG='1' order by class_id ";
  public static String product_class_SEL_CONSIGN_ONE_CLASS = "SELECT class_id,class_name FROM product_class WHERE LENGTH(class_id)=3 AND REMOVE_TAG='1' order by class_id ";
  public static String product_class_SEL_CONSIGN_SON_CLASS = "SELECT class_id,class_name FROM product_class WHERE LENGTH(class_id)=:VLENGTH  AND  class_id LIKE :VUP_ID AND REMOVE_TAG='1' order by class_id ";
  public static String product_class_SELECT_SON_BY_UP = "SELECT * FROM product_class WHERE LENGTH(class_id)=:VLENGTH  AND  class_id LIKE :VUP_ID AND REMOVE_TAG='1' order by class_id ";
  public static String product_class_UPDATE_BY_ALL_PRODUCT_CLASS = "update product_class set class_name=:VCLASS_NAME,class_desc=:VCLASS_DESC,remove_tag=:VREMOVE_TAG,oper_user=:VOPER_USER,list_model=:VLIST_MODEL,index_model=:VINDEX_MODEL,content_model=:VCONTENT_MODEL,store_path=:VSTOCE_PATH,list_rule=:VLIST_RULE,home_name=:VHOME_NAME,article_rule=:VARTICLE_RULE,dyna_show=:VDYNA_SHOW where class_id=:VCLASS_ID";
  public static String product_class_DELETE_BY_ALL_PRODUCT_CLASS = "update product_class set REMOVE_TAG='0' where class_id=:VCLASS_ID";
  public static String product_class_SELECT_PRODUCT_BY_CLASS_ID = "select product_id from product where class_id=:VCLASS_ID";
  public static String product_class_UPDATE_PRODUCT_CLASS_BY_ID = "update product_class set class_name=:VCLASS_NAME,class_desc=:VCLASS_DESC where class_id=:VCLASS_ID";
  public static String product_class_UPDATE_PRODUCT_CLASS_NAME_BY_CLASS_ID = "update product set class_name=:VCLASS_NAME where class_id=:VCLASS_ID";
  public static String product_class_UPDATE_SALES_CLASS_BY_ID = "update sales_class set class_name=:VCLASS_NAME,class_desc=:VCLASS_DESC where class_id=:VCLASS_ID";
  public static String product_class_UPDATE_BUYING_CLASS_BY_ID = "update buying_class set class_name=:VCLASS_NAME,class_desc=:VCLASS_DESC where class_id=:VCLASS_ID";
  public static String product_class_DELETE_BY_ALL_SALES_CLASS = "update sales_class set REMOVE_TAG='0' where class_id=:VCLASS_ID";
  public static String product_class_DELETE_BY_ALL_BUYING_CLASS = "update buying_class set REMOVE_TAG='0' where class_id=:VCLASS_ID";
  public static String product_class_SEL_BY_CLASSID_AND_CLASSNAME = "SELECT class_id,class_name FROM product_class where LENGTH(class_id)=6 and checked='1' and remove_tag='1' ";
  public static String product_class_SEL_BY_PRODUCTNAME = "select class_id,class_name from product_class where SUBSTRING(:VCLASS_ID,1,6) = class_id or SUBSTRING(:VCLASS_ID,1,10) = class_id or SUBSTRING(:VCLASS_ID,1,15) = class_id or SUBSTRING(:VCLASS_ID,1,20) = class_id order by  class_id asc";
  public static String product_class_SEL_PRO_CLASS_BY_LEVEL_CLASS_ID = "select class_id,class_name from product_class where class_id like :VCLASS_ID and length(class_id) = :VEVEL and remove_tag = 1";
  public static String role_DEL_BY_ROLE_AUTH_ID = "delete from role where role_auth_id = :VROLE_AUTH_ID";
  public static String product_attr_list_INS_ONE_PRODUCT_ATTR_LIST = "insert into product_attr_list(list_id,root_id,cust_id,class_id,class_name,attr_id,attr_name,attr_desc,attr_tag,attr_value,con_type,oper_user_id,in_date ) values(:VLIST_ID,:VPRODUCT_ID,:VCUST_ID,:VCLASS_ID,:VCLASS_NAME,:VATTR_ID,:VATTR_NAME,:VATTR_DESC,:VATTR_TAG,:VATTR_VALUE,:VCON_TYPE,:VPUBLISH_USER_ID,now())";
  public static String product_attr_list_UPDATE_ONE_PRODUCT_ATTR_LIST = "update product_attr_list set attr_value=:VATTR_VALUE,oper_user_id=:VOPER_USER_ID,in_date=now(),attr_id=:VATTR_ID,attr_name=:VATTR_NAME,class_id=:VCLASS_ID,class_name=:VCLASS_NAME,con_type=:VCON_TYPE,attr_desc=:VATTR_DESC,attr_tag=:VATTR_TAG where list_id=:VLIST_ID";
  public static String product_attr_list_SEL_BY_PRDUCT_ID_PRODUCT_ATTR_LIST = "select * from product_attr_list where root_id= ? ";
  public static String product_attr_list_DEL_BY_PRO_ID_PRODUCT_ATTR_LIST = "delete from product_attr_list where root_id=:VPRODUCT_ID";
  public static String product_SEL_ALL_NEWS_NT_TIME = "select b.product_id,b.product_name,b.validity,b.class_name,b.display_start_date,b.display_end_date,b.product_no from  product b where cust_id=:VCUST_ID and b.product_name like :VBUYING_NAME and substring(b.display_start_date,1,10) >= :VSTART and substring(b.display_start_date,1,10) <= :VEND and b.class_id like :VSELECT1 and b.validity like :VSELECT2 and b.validity<>9 and DATEDIFF(b.display_end_date,now())<=7 and DATEDIFF(b.display_end_date,now())>=0 and product_type=:VPRODUCT_TYPE order by product_no desc,oper_time desc";
  public static String product_SEL_ALL_NEWS_NT_HY = "select b.product_id,b.product_name,b.validity,b.class_name,b.display_start_date,b.display_end_date,b.product_no from  product b where cust_id=:VCUST_ID and b.product_name like :VBUYING_NAME and substring(b.display_start_date,1,10) >= :VSTART and substring(b.display_start_date,1,10) <=:VEND and b.class_id like :VSELECT1 and b.validity like :VSELECT2 and b.validity<>9 and product_type=:VPRODUCT_TYPE order by product_no desc,oper_time desc";
  public static String product_SEL_ALL_NEWS_NT_TIME_ADMIN = "select b.product_id,b.product_name,b.validity,b.class_name,b.display_start_date,b.display_end_date,b.product_no from  product b where b.product_name like :VBUYING_NAME and substring(b.display_start_date,1,10) >= :VSTART and substring(b.display_start_date,1,10) <= :VEND and b.class_id like :VSELECT1 and b.validity like :VSELECT2 and b.validity<>9 and DATEDIFF(b.display_end_date,now())<=7 and DATEDIFF(b.display_end_date,now())>=0 and product_type=:VPRODUCT_TYPE order by product_no desc,oper_time desc";
  public static String product_SEL_ALL_NEWS_NT_HY_ADMIN = "select b.product_id,b.product_name,b.validity,b.class_name,b.display_start_date,b.display_end_date,b.product_no from  product b where b.product_name like :VBUYING_NAME and substring(b.display_start_date,1,10) >= :VSTART and substring(b.display_start_date,1,10) <=:VEND and b.class_id like :VSELECT1 and b.validity like :VSELECT2 and b.validity<>9 and product_type=:VPRODUCT_TYPE order by product_no desc,oper_time desc";
  public static String maxproduct_SEL_ALL_NEWS_NT_TIME = "select b.product_id,b.product_name,b.validity,b.class_name,b.display_start_date,b.display_end_date,b.product_no ,b.max_date from  maxproduct b where  b.product_cust_id =:VCUST_ID and b.product_name like :VBUYING_NAME and left(b.max_date,10) >= :VSTART and left(b.max_date,10) <= :VEND and b.class_id like :VSELECT1 and b.validity like :VSELECT2 and b.validity<>9 and DATEDIFF(b.display_end_date,now())<=7 and DATEDIFF(b.display_end_date,now())>=0 and product_type=:VPRODUCT_TYPE order by product_no desc,oper_time desc";
  public static String maxproduct_SEL_ALL_NEWS_NT_HY = "select b.product_id,b.product_name,b.validity,b.class_name,b.display_start_date,b.display_end_date,b.product_no ,b.max_date from  maxproduct b where  b.product_cust_id =:VCUST_ID and b.product_name like :VBUYING_NAME and left(b.max_date,10) >= :VSTART and left(b.max_date,10) <=:VEND and b.class_id like :VSELECT1 and b.validity like :VSELECT2 and b.validity<>9 and product_type=:VPRODUCT_TYPE order by product_no desc,oper_time desc";
  public static String maxproduct_SEL_ALL_NEWS_NT_TIME_CHECK = "select b.product_id, b.prod_id,b.product_name,b.validity,b.class_name,b.display_start_date,b.display_end_date,b.product_no ,b.max_date,b.product_cust_name from  maxproduct b where  b.product_name like :VBUYING_NAME and left(b.max_date,10) >= :VSTART and left(b.max_date,10) <= :VEND and b.class_id like :VSELECT1 and b.validity like :VSELECT2 and (b.validity = '2' or b.validity = '0') and DATEDIFF(b.display_end_date,now())<=7 and DATEDIFF(b.display_end_date,now())>=0 and product_type=:VPRODUCT_TYPE and product_cust_name like :VCOMPANY_NAME order by product_no desc,oper_time desc";
  public static String maxproduct_SEL_ALL_NEWS_NT_HY_CHECK = "select b.product_id, b.prod_id,b.product_name,b.validity,b.class_name,b.display_start_date,b.display_end_date,b.product_no ,b.max_date ,b.product_cust_name from maxproduct b where   b.product_name like :VBUYING_NAME and left(b.max_date,10) >= :VSTART and left(b.max_date,10) <=:VEND and b.class_id like :VSELECT1 and b.validity like :VSELECT2 and (b.validity = '2' or b.validity = '0') and product_type=:VPRODUCT_TYPE and product_cust_name like :VCOMPANY_NAME order by product_no desc,oper_time desc";
  public static String tender_INS_ONE_TENDER = "insert into tender(cust_id,tenderid,title,synopsis,content,class_id,class_name,publish_user_id,oper_user,start_date,end_date,validity,web_tag,accessories,commend,list_top,hot_expo,good_expo,publish_date) values(:VCUST_ID ,:VTENDERID,:VTITLE,:VSYNOPSIS,:VCONTENT,:VCLASS_ID,:VCLASS_NAME,:VPUBLISH_USER_ID ,:VOPER_USER ,:VSTART_DATE,:VEND_DATE,:VVALIDITY,:VWEB_TAG ,:VACCESSORIES,:VCOMMEND,:VLIST_TOP,:VHOT_EXPO,:VGOOD_EXPO,now())";
  public static String tender_CHECK_TEND = "update tender set validity=:VVALIDITY where tenderid=:VTENDERID";
  public static String maxproduct_UNCHECK_MAXPRODUCT = "update maxproduct set validity='2' where prod_id=:VBUYING_ID";
  public static String maxproduct_CHECK_MAXPRODUCT = "update maxproduct set validity='1' where prod_id=:VBUYING_ID";
  public static String product_SEL_BY_CUST_ID_AND_CLASS_ID = "select p.product_id,p.product_name,p.product_type,p.small_img,p.class_id,c.cust_id,c.cust_name from product p,company c where p.display_end_date >= now() and p.display_start_date <=now() and p.validity = 1 and p.cust_id=c.cust_id and p.cust_id=:VCUST_ID and p.class_id like :VCLASS_ID";
  public static String product_SEL_BY_CUST_ID_AND_PRODUCT_NAME = "select p.product_id,p.product_name,p.product_type,p.small_img,p.class_id,c.cust_id,c.cust_name from product p,company c where p.display_end_date >= now() and p.display_start_date <= now() and p.validity = 1 and p.cust_id=c.cust_id and p.cust_id=:VCUST_ID and p.product_name like :VPRODUCT_NAME";
  public static String product_INS_ONE_PRODUCT = "insert into product(brand_name,validity,cust_id,product_id,product_type,product_name,product_abstract,product_desc,area_id,product_site,product_unit,class_name,class_id,display_end_date,display_start_date,keywords,big_img,product_style,publish_user_id,publish_date,moneytype,mid_img,small_img,product_no,product_price,high_trade_price,low_trade_price,standard,sale_support,applicable_addr,oper_user,oper_time,attach_id,num,product_numeric,product_level,back_reason ) values(:VBRAND_NAME,:VVALIDITY,:VCUST_ID,:VPRODUCT_ID,:VPRODUCT_TYPE,:VPRODUCT_NAME,:VPRODUCT_ABSTRACT,:VPRODUCT_DESC,:VAREA_ID,:VPRODUCT_SITE,:VPRODUCT_UNIT,:VCLASS_NAME,:VCLASS_ID,:VDISPLAY_END_DATE,:VDISPLAY_START_DATE,:VKEYWORDS ,:VBIG_IMG ,:VPRODUCT_STYLE,:VPUBLISH_USER_ID,now(),:VMONEYTYPE,:VMID_IMG,:VSMALL_IMG,:VPRODUCT_NO,:VPRODUCT_PRICE,:VHIGH_TRADE_PRICE,:VLOW_TRADE_PRICE,:VSTANDARD,:VSALE_SUPPORT,:VAPPLICABLE_ADDR,:VOPER_USER,now(),:VATTACH_ID,:VNUM,:VPRODUCT_NUMERIC,:VPRODUCT_LEVEL,:VBACK_REASON)";
  public static String product_SEL_BY_CUST = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and validity='1' order by p.oper_time desc";
  public static String product_SEL_BY_CUST_NUM = "select p.product_id,p.product_name,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and validity='1' order by p.oper_time desc";
  public static String product_SEL_BY_CUST2 = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and (validity='1' or validity='0' or validity='2') order by p.oper_time desc";
  public static String product_SEL_BY_CUST3 = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and (validity='0' or validity='2') order by p.oper_time desc";
  public static String product_SEL_BY_CUST_BY_PRODUCT_ID = "select commend,hot_product,good_product,list_top from product  where product_id =:VPRODUCT_ID";
  public static String product_UPDATE_COMMEND_BY_STORE_ID = "update product set commend =:VCOMMEND,commend_user_id=:VCOMMEND_USER_ID,commend_time=now() where product_id =:VPRODUCT_ID";
  public static String product_UPDATE_VALIDITY_BY_ID = "update product set validity='9',hot_product='0',good_product='0',commend='0',list_top='1',oper_user=:VCOMMEND_USER_ID,oper_time=now() where product_id =:VPRODUCT_ID";
  public static String product_UPDATE_HOT_PRODUCT_BY_STORE_ID = "update product set hot_product =:VHOT_PRODUCT  where product_id =:VPRODUCT_ID";
  public static String product_UPDATE_GOOD_PRODUCT_BY_STORE_ID = "update product set good_product =:VGOOD_PRODUCT where product_id =:VPRODUCT_ID";
  public static String product_UPDATE_LIST_TOP_BY_STORE_ID = "update product set list_top =:VLIST_TOP where product_id =:VPRODUCT_ID";
  public static String product_UPDATE_VALIDITY_BY_STORE_ID = "update product set validity=:VVALIDITY,check_time=now(), check_user=:VCHECK_USER,back_reason=:VBACK_REASON where product_id=:VPRODUCT_ID";
  public static String product_SEL_BY_PRODUCT_CUST_BY_PRODUCT_ID = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_id=:VPRODUCT_ID";
  public static String maxproduct_SEL_BY_MAXPRODUCT_CUST_BY_MAXPRODUCT_ID = "select p.*,c.cust_name from maxproduct p,company c where p.product_cust_id=c.cust_id and p.product_id=:VPRODUCT_ID";
  public static String product_DELETE_GOOD_PRODUCT_BY_STORE_ID = "update product set validity=:VVALIDITY,publish_date=now() where product_id=:VPRODUCT_ID";
  public static String product_REALDELETE__PRODUCT_BY_PRODUCT_ID = "delete from  product where product_id=:VPRODUCT_ID";
  public static String product_SEL_BY_CUST_NAME = "select p.*,c.* from product p,company c where p.cust_id=c.cust_id and validity!='9'and c.cust_name like :VCUST_NAME order by p.publish_date desc";
  public static String product_SEL_BY_PRODUCT_NAME = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and  validity='1'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME order by p.oper_time desc";
  public static String product_SEL_BY_PRODUCT_NAME_TIME = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and validity='1'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and substring(p.publish_date,1,10) >= :VSTART_DATE and substring(p.publish_date,1,10) <= :VEND_DATE order by p.oper_time desc";
  public static String product_SEL_BY_PRODUCT_NAME_ENDTIME = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and validity='1'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and substring(p.publish_date,1,10) <= :VEND_DATE order by p.oper_time desc";
  public static String product_SEL_BY_PRODUCT_NAME_STARTTIME = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and validity='1'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and substring(p.publish_date,1,10) >= :VSTART_DATE order by p.oper_time desc";
  public static String product_SEL_BY_CUST_PRODUCT_NAME = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and validity!='9'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME order by p.publish_date desc";
  public static String product_SEL_PRODUCT_FOR_LEAVE_USER_BY_ID = "select cust_id from product where product_id=:VPRODUCT_ID";
  public static String product_SEL_BY_CUST_MANGER = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.validity!='9' and p.cust_id =:VCUST_ID and p.product_type='0' order by p.product_no";
  public static String product_SEL_MEGER_BY_PRODUCT_NAME = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and p.product_name like :VPRODUCT_NAME and p.validity<>9 and p.validity like :VCUST_NAME and c.cust_id =:VCUST_ID order by p.product_no";
  public static String product_SEL_MEGER_BY_PRODUCTS_NAME = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and p.product_name like :VPRODUCT_NAME and p.validity<>9 and p.validity like :VCUST_NAME and c.cust_id =:VCUST_ID and DATEDIFF(p.display_end_date,now())>=0 and DATEDIFF(p.display_end_date,now())<=7 order by p.product_no";
  public static String product_SEL_BY_PRODUCT_NAMES = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and  validity='0'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and p.auto_state=:VCUST_ID order by p.publish_date";
  public static String product_SEL_BY_PRODUCT_NAME_ENDTIMES = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and validity='0'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and substring(p.publish_date,1,10) <= :VEND_DATE and p.auto_state=:VCUST_ID order by p.publish_date";
  public static String product_SEL_BY_PRODUCT_NAME_STARTTIMES = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and validity='0'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and substring(p.publish_date,1,10) >= :VSTART_DATE and p.auto_state=:VCUST_ID  order by p.publish_date";
  public static String product_SEL_BY_PRODUCT_NAME_TIMES = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and validity='0'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and substring(p.publish_date,1,10) >= :VSTART_DATE and substring(p.publish_date,1,10)<=:VEND_DATE and p.auto_state=:VCUST_ID order by p.publish_date";
  public static String product_SEL_BY_CUSTS = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and validity='0' order by p.publish_date";
  public static String product_UPDATE_HOT_PRODUCT_BY_DISPLAY_END_DATE = "update product set display_end_date=:VDISPLAY_END_DATE where product_id=:VPRODUCT_ID";
  public static String product_SEL_BY_CUST_SERVICES = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and validity='0' order by p.publish_date desc";
  public static String product_SEL_BY_CUST_MANGER_SERVICE = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.validity!='9' and p.cust_id =:VCUST_ID and p.product_type='1' order by p.product_no";
  public static String product_SEL_MEGER_BY_SERVICE_NAME = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and p.product_name like :VPRODUCT_NAME and p.validity<>9 and p.validity like :VCUST_NAME and c.cust_id =:VCUST_ID order by p.product_no";
  public static String product_SEL_MANGER_BY_SERVICE_NAME_TIME = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and p.product_name like :VPRODUCT_NAME and p.validity<>9 and p.validity like :VCUST_NAME and p.publish_date between :VSTART_DATE and :VEND_DATE and c.cust_id =:VCUST_ID order by p.product_no ";
  public static String product_SEL_MEGER_BY_S_NAME_SERVICE = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and p.product_name like :VPRODUCT_NAME and p.validity<>9 and p.validity like :VCUST_NAME and c.cust_id =:VCUST_ID and DATEDIFF(p.display_end_date,now())>=0 and DATEDIFF(p.display_end_date,now())<=7 order by p.product_no";
  public static String product_SEL_MANGER_BY_SERVICES_NAME_TIME = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and p.product_name like :VPRODUCT_NAME and p.validity<>9 and p.validity like :VCUST_NAME and p.publish_date between :VSTART_DATE) and :VEND_DATE and c.cust_id =:VCUST_ID and DATEDIFF(p.display_end_date,now())>=0 and DATEDIFF(p.display_end_date,now())<=7 order by p.product_no ";
  public static String product_SEL_BY_CUST_SERVICE = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and validity!='9' order by p.publish_date desc";
  public static String product_SEL_BY_SERVICE_NAME = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and  validity!='9'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME order by p.publish_date desc";
  public static String product_SEL_BY_SEVICE_NAME_ENDTIME = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and validity!='9'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and p.publish_date <= :VEND_DATE order by p.publish_date desc";
  public static String product_SEL_BY_SERVER_NAME_STARTTIME = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and validity!='9'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and substring(p.publish_date,1,10) >= :VSTART_DATE order by p.publish_date desc";
  public static String product_SEL_BY_SERVER_NAME_TIME = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and validity!='9'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and substring(p.publish_date,1,10) >= :VSTART_DATE and substring(p.publish_date,1,10) <= :VEND_DATE order by p.publish_date desc";
  public static String product_SEL_BY_PRODUCT_NAMES_SER = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and  validity='0'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and p.auto_state=:VCUST_ID order by p.publish_date desc";
  public static String product_SEL_BY_PRODUCT_NAME_ENDTIMES_SER = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and validity='0'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and p.publish_date <= :VEND_DATE and p.auto_state=:VCUST_ID order by p.publish_date desc";
  public static String product_SEL_BY_PRODUCT_NAME_STARTTIMES_SER = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and validity='0'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and substring(p.publish_date,1,10) >= :VSTART_DATE and p.auto_state=:VCUST_ID  order by p.publish_date desc";
  public static String product_SEL_BY_PRODUCT_NAME_TIMES_SER = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and validity='0'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and p.publish_date between :VSTART_DATE and :VEND_DATE and p.auto_state=:VCUST_ID order by p.publish_date desc";
  public static String product_SEL_BY_PRODUCT_NAME_DEL_SER = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and validity ='9' and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME  order by p.publish_date desc";
  public static String product_SEL_BY_PRODUCT_NAME_DEL_ENDDATE_SER = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and validity ='9' and p.publish_date <= :VEND_DATE and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME  order by p.publish_date desc";
  public static String product_SEL_BY_PRODUCT_NAME_STARTTIME_DEL_SER = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and validity ='9'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and substring(p.publish_date,1,10) >= :VSTART_DATE order by p.publish_date desc";
  public static String product_SEL_BY_PRODUCT_NAME_TIME_DEL_SER = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and validity ='9'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and substring(p.publish_date,1,10) >= :VSTART_DATE and substring(p.publish_date,1,10) <= :VEND_DATE order by p.publish_date desc";
  public static String product_SEL_BY_CUST_DEL_SER = "select p.*,c.cust_name,c.cust_id ccust_id from product p,company c where p.cust_id=c.cust_id and p.product_type='1' and validity='9' order by p.publish_date desc";
  public static String product_SEL_MANGER_BY_PRODUCTS_NAME_TIME = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and p.product_name like :VPRODUCT_NAME and p.validity<>9 and p.validity like :VCUST_NAME and p.publish_date between :VSTART_DATE and :VEND_DATE and c.cust_id =:VCUST_ID and DATEDIFF(p.display_end_date,now())>=0 and DATEDIFF(p.display_end_date,now())<=7 order by p.product_no ";
  public static String product_SEL_MANGER_BY_PRODUCT_NAME_TIME = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and p.product_name like :VPRODUCT_NAME and p.validity<>9 and p.validity like :VCUST_NAME and p.publish_date between :VSTART_DATE and :VEND_DATE and c.cust_id =:VCUST_ID order by p.product_no ";
  public static String product_UPDATE_ONE_PRODUCT = "update product set brand_name=:VBRAND_NAME,product_name=:VPRODUCT_NAME,class_id=:VCLASS_ID,class_name=:VCLASS_NAME,product_no=:VPRODUCT_NO,num=:VNUM,product_abstract=:VPRODUCT_ABSTRACT,display_start_date=:VDISPLAY_START_DATE,display_end_date=:VDISPLAY_END_DATE,big_img=:VBIG_IMG,product_style=:VPRODUCT_STYLE,product_price=:VPRODUCT_PRICE,product_unit=:VPRODUCT_UNIT,moneytype=:VMONEYTYPE,low_trade_price=:VLOW_TRADE_PRICE,high_trade_price=:VHIGH_TRADE_PRICE,standard=:VSTANDARD,area_id=:VAREA_ID,product_site=:VPRODUCT_SITE,applicable_addr=:VAPPLICABLE_ADDR,keywords=:VKEYWORDS,sale_support=:VSALE_SUPPORT,product_desc=:VPRODUCT_DESC,product_type=:VPRODUCT_TYPE,validity=:VVALIDITY,oper_user=:VOPER_USER,oper_time=now(),product_numeric=:VPRODUCT_NUMERIC,product_level=:VPRODUCT_LEVEL where product_id=:VPRODUCT_ID";
  public static String product_SEL_BY_PRODUCT_NAME_DEL = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and validity ='9' and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME  order by p.publish_date desc";
  public static String product_SEL_BY_PRODUCT_NAME_DEL_ENDDATE = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and validity ='9' and substring(p.publish_date,1,10) <= :VEND_DATE and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME  order by p.publish_date desc";
  public static String product_SEL_BY_PRODUCT_NAME_STARTTIME_DEL = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and validity ='9'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and substring(p.publish_date,1,10) >= :VSTART_DATE order by p.publish_date desc";
  public static String product_SEL_BY_PRODUCT_NAME_TIME_DEL = "select p.*,c.cust_name from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and validity ='9'and p.product_name like :VPRODUCT_NAME and c.cust_name like :VCUST_NAME and substring(p.publish_date,1,10) >= :VSTART_DATE and substring(p.publish_date,1,10) <= :VEND_DATE order by p.publish_date desc";
  public static String product_SEL_BY_CUST_DEL = "select p.*,c.cust_name,c.cust_id ccust_id from product p,company c where p.cust_id=c.cust_id and p.product_type='0' and validity='9' order by p.publish_date desc";
  public static String product_SELET_PRODUCTNUM_BY_AREA = "select cust_id,product_id,product_name,product_site from product where area_id like :VAREA_ID";
  public static String product_SEL_PRODUCT_BY_CUST_ID = "select p.product_id,p.product_name,p.product_type,p.small_img,p.class_id,c.cust_id,c.cust_name from product p,company c where p.display_end_date >= now() and p.display_start_date <= now() and p.validity = 1 and p.cust_id=c.cust_id and p.cust_id =:VCUST_ID order by product_no desc";
  public static String product_UPDATE_FABU_VALIDITY_BY_STORE_ID = "update product set validity=:VVALIDITY,publish_date=now(), publish_user_id=:VPUBLISH_USER_ID where product_id=:VPRODUCT_ID";
  public static String sales_INS_BY_ALL = "insert into sales(sales_id,cust_id,product_id,product_type,title,product_name,class_name,class_id,area_id,product_abstract,product_desc,product_site,product_unit,attach_tag,update_user_id,update_time,display_time,display_end_date,display_start_date,moneytype,num,pack_type,mini_supply,delivery,logistics,sale_patter,payment_patter,keyword,big_img,mid_img,small_img,click,commend,commend_user_id,commend_time,hot_sales,good_sales,color,product_key,product_privicy,list_top,sale_price,mutil_price, publish_user_id,publish_date,validity,check_user,check_time,back_reason,attach_id,oper_time) values (:VSALES_ID,:VCUST_ID,:VPRODUCT_ID,:VPRODUCT_TYPE,:VTITLE,:VPRODUCT_NAME,:VCLASS_NAME,:VCLASS_ID,:VAREA_ID,:VPRODUCT_ABSTRACT,:VPRODUCT_DESC,:VPRODUCT_SITE,:VPRODUCT_UNIT,:VATTACH_TAG,:VUPDATE_USER_ID,now(),now(),:VDISPLAY_END_DATE,:VDISPLAY_START_DATE,:VMONEYTYPE,:VNUM,:VPACK_TYPE,:VMINI_SUPPLY,:VDELIVERY,:VLOGISTICS,:VSALE_PATTER,:VPAYMENT_PATTER,:VKEYWORD,:VBIG_IMG,:VMID_IMG,:VSMALL_IMG,:VCLICK,:VCOMMEND,:VCOMMEND_USER_ID,now(),:VHOT_SALES,:VGOOD_SALES,:VCOLOR,:VPRODUCT_KEY,:VPRODUCT_PRIVICY,:VLIST_TOP,:VSALE_PRICE,:VMUTIL_PRICE,:VPUBLISH_USER_ID,now(),:VALIDITY,:VCHECK_USER,now(),:VBACK_REASON,:VATTACH_ID,now())";
  public static String sales_SELECT_ONE_BY_ID = "select * from sales where sales_id=:VSALES_ID";
  public static String sales_UPDATE_SALES_BY_SALES_ID = "update sales set keyword=:VKEYWORD,moneytype=:VMONEYTYPE,product_name=:VPRODUCT_NAME,title=:VTITLE,class_id=:VCLASS_ID,class_name=:VCLASS_NAME,product_abstract=:VPRODUCT_ABSTRACT,big_img =:VBIG_IMG,mid_img=:VMID_IMG,small_img=:VSMALL_IMG,display =:VDISPLAY,display_start_date=:VDISPLAY_START_DATE,display_end_date=:VDISPLAY_END_DATE,num=:VNUM,product_unit=:VPRODUCT_UNIT,mini_supply =:VMINI_SUPPLY,sale_price=:VSALE_PRICE,mutil_price =:VMUTIL_PRICE,product_site=:VPRODUCT_SITE,product_desc=:VPRODUCT_DESC,product_type=:VPRODUCT_TYPE,attach_tag=:VATTACH_TAG,sale_patter =:VSALE_PATTER,payment_patter=:VPAYMENT_PATTER,commend =:VCOMMEND,good_sales=:VGOOD_SALES,list_top=:VLIST_TOP,validity=:VALIDITY,oper_time=now() where sales_id=:VSALES_ID";
  public static String sales_SELECT_ALL_BY_CUST_ID = "select sales_id,cust_id,product_id,product_type,product_name,class_name,class_id,area_id,product_abstract,product_desc,product_site,product_unit,attach_tag,update_user_id,update_time,display_time,display,display_end_date,display_start_date,num,pack_type,mini_supply,delivery,logistics,sale_patter,payment_patter,keyword,big_img,mid_img,small_img,click,commend,commend_user_id,commend_time,hot_sales,good_sales,color,product_key,product_privicy,list_top,sale_price,mutil_price, publish_user_id,publish_date,validity,check_user,check_time,back_reason,moneytype,title,attach_id from sales where cust_id=:VCUST_ID and validity!='9' order by publish_date desc";
  public static String sales_SELECT_ALL_BY_CUST_ID_DATE = "select sales_id,cust_id,product_id,product_type,product_name,class_name,class_id,area_id,product_abstract,product_desc,product_site,product_unit,attach_tag,update_user_id,update_time,display_time,display,display_end_date,display_start_date,num,pack_type,mini_supply,delivery,logistics,sale_patter,payment_patter,keyword,big_img,mid_img,small_img,click,commend,commend_user_id,commend_time,hot_sales,good_sales,color,product_key,product_privicy,list_top,sale_price,mutil_price, publish_user_id,publish_date,validity,check_user,check_time,back_reason,moneytype,title,attach_id,oper_time from sales where cust_id=:VCUST_ID and validity like :VVALIDITY and validity!=9 and title like :VTITLE order by oper_time desc";
  public static String sales_SELECT_BY_CUST_ID_DATE = "select sales_id,cust_id,product_id,product_type,product_name,class_name,class_id,area_id,product_abstract,product_desc,product_site,product_unit,attach_tag,update_user_id,update_time,display_time,display,display_end_date,display_start_date,num,pack_type,mini_supply,delivery,logistics,sale_patter,payment_patter,keyword,big_img,mid_img,small_img,click,commend,commend_user_id,commend_time,hot_sales,good_sales,color,product_key,product_privicy,list_top,sale_price,mutil_price, publish_user_id,publish_date,validity,check_user,check_time,back_reason,moneytype,title,attach_id,oper_time from sales where cust_id=:VCUST_ID and (substring(oper_time,1,10) between :VSTART and :VEND) and class_id like :VCLASS_ID and validity like :VVALIDITY and validity!=9 and title like :VTITLE order by oper_time desc";
  public static String sales_SELECT_BY_CUST_ID_END = "select sales_id,cust_id,product_id,product_type,product_name,class_name,class_id,area_id,product_abstract,product_desc,product_site,product_unit,attach_tag,update_user_id,update_time,display_time,display,display_end_date,display_start_date,num,pack_type,mini_supply,delivery,logistics,sale_patter,payment_patter,keyword,big_img,mid_img,small_img,click,commend,commend_user_id,commend_time,hot_sales,good_sales,color,product_key,product_privicy,list_top,sale_price,mutil_price, publish_user_id,publish_date,validity,check_user,check_time,back_reason,moneytype,title,attach_id,oper_time from sales where cust_id=:VCUST_ID and (substring(oper_time,1,10) <= :VEND) and class_id like :VCLASS_ID and validity like :VVALIDITY and validity!=9 and title like :VTITLE order by oper_time desc";
  public static String sales_SELECT_BY_CUST_ID_START = "select sales_id,cust_id,product_id,product_type,product_name,class_name,class_id,area_id,product_abstract,product_desc,product_site,product_unit,attach_tag,update_user_id,update_time,display_time,display,display_end_date,display_start_date,num,pack_type,mini_supply,delivery,logistics,sale_patter,payment_patter,keyword,big_img,mid_img,small_img,click,commend,commend_user_id,commend_time,hot_sales,good_sales,color,product_key,product_privicy,list_top,sale_price,mutil_price, publish_user_id,publish_date,validity,check_user,check_time,back_reason,moneytype,title,attach_id,oper_time from sales where cust_id=:VCUST_ID and (substring(oper_time,1,10) >= :VSTART) and class_id like :VCLASS_ID and validity like :VVALIDITY and validity!=9 and title like :VTITLE order by oper_time desc";
  public static String sales_SELECT_BY_CUST_ID = "select sales_id,cust_id,product_id,product_type,product_name,class_name,class_id,area_id,product_abstract,product_desc,product_site,product_unit,attach_tag,update_user_id,update_time,display_time,display,display_end_date,display_start_date,num,pack_type,mini_supply,delivery,logistics,sale_patter,payment_patter,keyword,big_img,mid_img,small_img,click,commend,commend_user_id,commend_time,hot_sales,good_sales,color,product_key,product_privicy,list_top,sale_price,mutil_price, publish_user_id,publish_date,validity,check_user,check_time,back_reason,moneytype,title,attach_id,oper_time from sales where cust_id=:VCUST_ID and class_id like :VCLASS_ID and validity like :VVALIDITY and validity!=9 and title like :VTITLE order by oper_time desc";
  public static String sales_SELECT_ALL_BY_CUST_ID_TITLE = "select sales_id,cust_id,product_id,product_type,product_name,class_name,class_id,area_id,product_abstract,product_desc,product_site,product_unit,attach_tag,update_user_id,update_time,display_time,display,display_end_date,display_start_date,num,pack_type,mini_supply,delivery,logistics,sale_patter,payment_patter,keyword,big_img,mid_img,small_img,click,commend,commend_user_id,commend_time,hot_sales,good_sales,color,product_key,product_privicy,list_top,sale_price,mutil_price, publish_user_id,publish_date,validity,check_user,check_time,back_reason,moneytype,title,attach_id from sales where cust_id=:VCUST_ID and validity!='9' and (product_name like :VTITLE or title like :VTITLE) order by publish_date desc";
  public static String sales_DELETE_SALES_BY_SALES_ID = "update sales set validity='9' where sales_id=:VSALES_ID";
  public static String sales_UPDATE_PUBLISH_DATE_BY_ID = "update sales set publish_date=now(),validity='1'  where sales_id=:VSALES_ID";
  public static String sales_SELECT_PRODUCTNUM_BY_AREA = "select sales_id,cust_id,product_id,product_type,product_name,class_name,class_id,area_id,product_abstract,product_desc,product_site,product_unit,attach_tag,update_user_id,update_time,display_time,display,display_end_date,display_start_date,num,pack_type,mini_supply,delivery,logistics,sale_patter from sales where class_id like :VCLASS_ID";
  public static String sales_SEL_BY_SALES_CUST_BY_SALES_ID = "select s.*,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.sales_id=:VSEALES_ID";
  public static String sales_SELECT_ALL_BY_LIMIT = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity!='9' and s.validity = '1' order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_LIMIT_TIME = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity!='9' and s.validity='1' and date(s.publish_date) >= :VSTART_DATE AND date(s.publish_date) <= :VEND_DATE order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_LIMIT_TITLE = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity!='9' and s.validity='1' and s.title like :VTITLE order by s.publish_date desc";
  public static String sales_COMMEND_SALES_BY_SALES_ID = "update sales set commend=:VCOMMEND,commend_user_id=:VUSER_ID,commend_time=now() where sales_id=:VSALES_ID ";
  public static String sales_SELECT_ALL_BY_VALIDITY = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and (s.validity = '0' or s.validity = '2') order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME1 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity=0 and s.title like :VKEYWORD  order by s.publish_date ";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME2 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity=0 and s.title like :VKEYWORD and  date(s.publish_date) >= :VSTART_DATE  order by s.publish_date ";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME3 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity=0 and s.title like :VKEYWORD and  date(s.publish_date) <= :VEND_DATE order by s.publish_date ";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME4 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity=0 and s.title like :VKEYWORD and  date(s.publish_date) >= :VSTART_DATE AND date(s.publish_date) <= :VEND_DATE order by s.publish_date ";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME5 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity=1 and s.title like :VKEYWORD  order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME6 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity=1 and s.title like :VKEYWORD and  date(s.publish_date) >= :VSTART_DATE  order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME7 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity=1 and s.title like :VKEYWORD and  date(s.publish_date) <= :VEND_DATE order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME8 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity=1 and s.title like :VKEYWORD and  date(s.publish_date) >= :VSTART_DATE AND date(s.publish_date) <= :VEND_DATE order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME9 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity<>9 and s.title like :VKEYWORD  order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME10 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity<>9 and s.title like :VKEYWORD and  date(s.publish_date) >= :VSTART_DATE  order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME11 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity<>9 and s.title like :VKEYWORD and  date(s.publish_date) <= :VEND_DATE order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME12 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and (s.validity=0 or s.validity=1 or s.validity=2 ) and s.title like :VKEYWORD and  date(s.publish_date) >= :VSTART_DATE AND date(s.publish_date) <= :VEND_DATE order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME122 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and (s.validity=0 or s.validity=2 ) and s.title like :VKEYWORD and  date(s.publish_date) >= :VSTART_DATE AND date(s.publish_date) <= :VEND_DATE order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME13 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity=9 and s.title like :VKEYWORD  order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME14 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity=9 and s.title like :VKEYWORD and date(s.publish_date) >= :VSTART_DATE  order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME15 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity=9 and s.title like :VKEYWORD and  date(s.publish_date) <= :VEND_DATE order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME16 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity=9 and s.title like :VKEYWORD and  date(s.publish_date) BETWEEN :VSTART_DATE AND :VEND_DATE order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VALIDITY_TIME162 = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and (s.validity=0 or s.validity=2 ) and s.title like :VKEYWORD and  date(s.publish_date) BETWEEN :VSTART_DATE AND :VEND_DATE order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VALIDITY_TITLE = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id and s.validity!='9' and s.validity!=:VALIDITY and (s.product_name like :VTITLE or s.title like :VTITLE)  order by s.publish_date desc";
  public static String sales_UPDATE_SALES_VALIDITY = "update sales set validity=:VALIDITY,back_reason=:VBACK_REASON where sales_id=:VSALES_ID";
  public static String sales_TOP_SALES_BY_SALES_ID = "update sales set list_top=:VLIST_TOP where sales_id=:VSALES_ID";
  public static String sales_HOT_SALES_BY_SALES_ID = "update sales set hot_sales=:VHOT_SALES where sales_id=:VSALES_ID";
  public static String sales_GOOD_SALES_BY_SALES_ID = "update sales set good_sales=:VGOOD_SALES where sales_id=:VSALES_ID";
  public static String sales_SELECT_ALL_BY_VAL = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id  and s.validity=:VALIDITY order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VAL_TIME = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id  and s.validity=:VALIDITY and date(s.publish_date) BETWEEN :VSTART_DATE AND :VEND_DATE order by s.publish_date desc";
  public static String sales_SELECT_ALL_BY_VAL_TITLE = "select s.sales_id,s.cust_id,s.product_id,s.product_type,s.product_name,s.class_name,s.class_id,s.area_id,s.product_abstract,s.product_desc,s.product_site,s.product_unit,s.attach_tag,s.update_user_id,s.update_time,s.display_time,s.display,s.display_end_date,s.display_start_date,s.num,s.pack_type,s.mini_supply,s.delivery,s.logistics,s.sale_patter,s.payment_patter,s.keyword,s.big_img,s.mid_img,s.small_img,s.click,s.commend,s.commend_user_id,s.commend_time,s.hot_sales,s.good_sales,s.color,s.product_key,s.product_privicy,s.list_top,s.sale_price,s.mutil_price,s.publish_user_id,s.publish_date,s.validity,s.check_user,s.check_time,s.back_reason,s.moneytype,s.title,s.attach_id,c.cust_name from sales s,company c where s.cust_id=c.cust_id  and s.validity=:VALIDITY and (s.product_name like :VTITLE or title like :VTITLE ) order by s.publish_date desc";
  public static String sales_SEL_BY_GONGYING_INFO_CONUT_FROM_LEAVEWORDS = "select sales_id from sales where cust_id=:VCUST_ID and validity = 1";
  public static String sales_SEL_BY_GONGYING_OUT_TIME_CONUT_FROM_LEAVEWORDS = "select sales_id from sales where cust_id=:VCUST_ID and display_end_date<now() and validity!='9'";
  public static String sales_SELECT_ALL_BY_CUST_ID_SALES_INFO = "update sales set validity='9' where sales_id=:VSALES_ID";
  public static String sales_SELECT_ALL_BY_CUST_ID_FRO_OUT_TIME = "select sales_id,cust_id,product_id,product_type,product_name,class_name,class_id,area_id,product_abstract,product_desc,product_site,product_unit,attach_tag,update_user_id,update_time,display_time,display,display_end_date,display_start_date,num,pack_type,mini_supply,delivery,logistics,sale_patter,payment_patter,keyword,big_img,mid_img,small_img,click,commend,commend_user_id,commend_time,hot_sales,good_sales,color,product_key,product_privicy,list_top,sale_price,mutil_price, publish_user_id,publish_date,validity,check_user,check_time,back_reason,moneytype,title,attach from sales where cust_id=:VCUST_ID and display_end_date<now() order by display_end_date desc";
  public static String sales_SELECT_ALL_BY_CUST_ID_DATE_START_TIME = "select sales_id,cust_id,product_id,product_type,product_name,class_name,class_id,area_id,product_abstract,product_desc,product_site,product_unit,attach_tag,update_user_id,update_time,display_time,display,display_end_date,display_start_date,num,pack_type,mini_supply,delivery,logistics,sale_patter,payment_patter,keyword,big_img,mid_img,small_img,click,commend,commend_user_id,commend_time,hot_sales,good_sales,color,product_key,product_privicy,list_top,sale_price,mutil_price, publish_user_id,publish_date,validity,check_user,check_time,back_reason,moneytype,title,attach from sales where cust_id=:VCUST_ID and display_end_date<now() and date(display_end_date) BETWEEN :VSTART_DATE AND :VEND_DATE order by display_end_date desc";
  public static String sales_SELECT_ALL_BY_CUST_ID_TITLE_OUT_TIME_BY_KEYWORD = "select sales_id,cust_id,product_id,product_type,product_name,class_name,class_id,area_id,product_abstract,product_desc,product_site,product_unit,attach_tag,update_user_id,update_time,display_time,display,display_end_date,display_start_date,num,pack_type,mini_supply,delivery,logistics,sale_patter,payment_patter,keyword,big_img,mid_img,small_img,click,commend,commend_user_id,commend_time,hot_sales,good_sales,color,product_key,product_privicy,list_top,sale_price,mutil_price, publish_user_id,publish_date,validity,check_user,check_time,back_reason,moneytype,title,attach from sales where cust_id=:VCUST_ID and display_end_date<now() and product_name like :VTITLE order by publish_date desc";
  public static String sales_SELECT_SALENUM_BY_AREA_ID = "select cust_id,product_id,product_name from sales where area_id like :VAREA_ID";
  public static String score_list_GET_ALL_SCORE_LIST = "select * from score_list order by add_date desc ";
  public static String score_list_GET_ALL_SCORE_LIST_MEMBER = "select * from score_list where cust_id=:VCUST_ID order by add_date desc ";
  public static String score_list_GET_ALL_SCORE_LIST_BY_TIME = "select * from score_list where add_date between :VSTART and :VEND order by add_date desc ";
  public static String score_list_GET_ALL_SCORE_LIST_BY_TIME_MEMBER = "select * from score_list where add_date between :VSTART and :VEND and cust_id=:VCUST_ID order by add_date desc ";
  public static String score_list_GET_ALL_SCORE_LIST_BY_CUST_ID = "select * from score_list where cust_id = :VCUST_ID";
  public static String score_list_GET_ALL_SCORE_LIST_BY_USER_ID = "select * from score_list where user_id = :VUSER_ID";
  public static String score_list_GET_SCORE_MODEL_ID_BY_ID = "select score_model_id from score_list where score_model_id = :VSCORE_MODEL_ID";
  public static String links_SEL_INDEXLINK_BY_NAME = "select distinct ui.cust_name,l.trade_id,l.link_name,l.link_addr,l.link_comment,l.cust_id,l.oper_user,l.oper_time from links l inner join user_info ui on ui.cust_id=l.cust_id  where l.cust_id=:VCUST_ID and l.link_name like :VLINK_NAME order by l.oper_time desc";
  public static String links_SEL_BY_NAME = "select distinct ui.cust_name,l.trade_id,l.link_name,l.link_addr,l.link_comment,l.cust_id,l.oper_user from links l inner join user_info ui on ui.cust_id=l.cust_id where l.link_name like :VLINK_NAME group by l.trade_id order by l.add_time desc";
  public static String links_SEL_INDEXLINK_BY_CUST_ID = "select distinct ui.cust_name,l.trade_id,l.link_name,l.link_addr,l.link_comment,l.cust_id,l.oper_user from links l inner join user_info ui on ui.cust_id=l.cust_id  where l.cust_id=:VCUST_ID order by l.add_time desc";
  public static String links_SEL_INDEXLINK_BY_ID = "select distinct ui.cust_name,l.trade_id,l.link_name,l.link_addr,l.link_comment,l.cust_id,l.oper_user from links l inner join user_info ui on ui.cust_id=l.cust_id where l.trade_id=:VTRADE_ID order by l.add_time desc ";
  public static String links_SEL_INDEXLINK_ALL = "select distinct ui.cust_name,l.trade_id,l.link_name,l.link_addr,l.link_comment,l.cust_id,l.oper_user from links l inner join user_info ui on ui.cust_id=l.cust_id order by l.add_time desc ";
  public static String links_SEL_BY_All = "select distinct ui.cust_name,l.trade_id,l.link_name,l.link_addr,l.link_comment,l.cust_id,l.oper_user from links l inner join user_info ui on ui.cust_id=l.cust_id group by l.trade_id order by l.add_time desc";
  public static String links_INS_INDEXLINK_ONE = "insert into links(trade_id,link_name,link_addr,link_comment,cust_id,oper_user,oper_time,add_time) values(:VTRADE_ID,:VLINK_NAME,:VLINK_ADDR,:VLINK_COMMENT,:VCUST_ID,:VOPER_USER,now(),now())";
  public static String links_UPDATE_BY_ID = "update links set link_name=:VLINK_NAME, link_addr=:VLINK_ADDR, link_comment=:VLINK_COMMENT, cust_id=:VCUST_ID, oper_user=:VOPER_USER,oper_time=now() where trade_id=:VTRADE_ID";
  public static String links_RELOAD_STOCK_BY_TRADE_ID = "delete from links where trade_id=:VTRADE_ID";
  public static String role_GET_MENUINFOS_BY_ROLE_AUTH_ID_AND_MENU = "select menu_name,menu_path,menu_id from role where role_auth_id=:VROLE_AUTH_ID and display='1' and length(menu_id)=:VLENGTH and menu_id like :VMENU_ID order by sort_no,menu_id asc";
  public static String role_GET_MENUINFOS_BY_ROLE_AUTH_ID = "select menu_name,menu_path,menu_id from role where role_auth_id= ? and display='1' and length(menu_id)=3 order by sort_no,menu_id asc";
  public static String role_GET_MENUINFO_BY_ROLE_TYPE = "select distinct role_name ,cust_id,role_auth_id from role where role_type = :VROLE_TYPE ";
  public static String role_INS_ROLE_INFO_BY_ALL = "insert into role(role_id,role_name,cust_id,remove_tag,menu_id,menu_name,menu_path,oper_user,oper_time,role_auth_id,sort_no,display,role_type) values (:VROLE_ID,:VROLE_NAME,:VCUST_ID,'1',:VMENU_ID,:VMENU_NAME,:VMENU_PATH,:VOPER_NAME,now(),:VROLE_AUTH_ID,:VSORT_NO,:VDISPLAY,:VROLE_TYPE)";
  public static String role_GET_ROLE_NAME_BY_NAME = "select role_name from role where role_name = :VROLE_NAME ";
  public static String role_GET_ROEL_INFOS = "select distinct role_name,role_type,role_auth_id from role where cust_id = :VCUST_ID ";
  public static String role_DEL_BY_ROLE_NAME = "delete from role where role_auth_id = :VAUTH_ROLE_ID";
  public static String role_GET_ALL_ROEL_INFO = "select cust_id,role_id, role_name, menu_id,menu_name, menu_path from role where cust_id = :VCUST_ID order by role_name ";
  public static String role_GET_MENUINFO_NOT_IN_MENUINFO = "select subsys_code,menu_id,menu_name,menu_path from menu_info where menu_name not in (select menu_name from role where role_name = :VROLE_NAME and cust_id = :VCUST_ID) and remove_tag=1 and check_auth=1 order by subsys_code desc";
  public static String role_GET_MENUINFO_BY_ROLE_NAME = "select menu_id,menu_name,menu_path,sort_no,display from role where role_auth_id = :VROLE_AUTH_ID";
  public static String role_GET_ROLE_INFO_BY_ROLE_NAME = "select role_id,remove_tag,menu_id,menu_name,menu_path from role where role_name = :VROLE_NAME";
  public static String role_GET_ROLE_NAME = "select role_name from role group by role_name";
  public static String role_GET_ROLE_BY_ROLE_NAME = "select menu_id,menu_name,menu_path,role_name from role where role_name = :VROLE_NAME";
  public static String role_DELETE_INTO_ROLE = "delete from role where menu_id like :VMENU_ID";
  public static String menu_info_GET_ALL_MENUINFO_TO_DHTMXTREE = "select subsys_code,menu_id,menu_name,menu_path,sort_no,display from menu_info where  remove_tag=1 and check_auth=1 and subsys_code = :VSUBSYS_CODE order by menu_id asc";
  public static String role_GET_ROLE_NAME_BY_AUTH_ID = "select distinct role_name from role where role_auth_id = :VROLE_AUTH_ID";
  public static String user_info_UPDATE_ROLE_ID = "update user_info set role_auth_id = :VAUTH_ROLE_ID where role_auth_id = :VROLE_ANME";
  public static String menu_info_UPDATE_DOWN_MENU = "update menu_info set remove_tag=:VREMOVE_TAG where menu_id like :VMENU_ID";
  public static String menu_info_UPDATE_INTO_MENU_SORT_NO = "update menu_info set sort_no=:VSORT_NO where menu_id=:VMENU_ID";
  public static String menu_info_UPDATE_INTO_MENU_ROLE_SORT_NO = "update role set sort_no=:VSORT_NO where menu_id=:VMENU_ID";
  public static String menu_info_SEL_ALL_ONE_BY_NAME = "SELECT * FROM menu_info WHERE LENGTH(menu_id)=3 and subsys_code=:VSUBSYS_CODE and menu_name like :VMENU_NAME order by sort_no,menu_id desc";
  public static String menu_info_SELECT_SON_BY_UPNAME = "SELECT * FROM menu_info WHERE LENGTH(menu_id)=:VLENGTH AND menu_id LIKE :VUP_ID and menu_name like :VMENU_NAME and subsys_code=:VSUBSYS_CODE order by sort_no,menu_id desc";
  public static String menu_info_SEL_CHECK_AUTH_BY_MENU_PATH = "select check_auth from menu_info where menu_path = :VMENU_PATH";
  public static String menu_info_GET_MENUINFOS_ADMIN = "select subsys_code,menu_id,menu_name,menu_path,check_auth,sort_no,display from menu_info where remove_tag=1 and subsys_code = 'B2B.SYS' order by subsys_code desc ";
  public static String menu_info_GET_MENUINFOS_USER = "select subsys_code,menu_id,menu_name,menu_path,check_auth,sort_no,display from menu_info where remove_tag=1 and check_auth=1 and subsys_code = 'B2B.USER' order by subsys_code desc ";
  public static String menu_info_SELECT_MAXID = "SELECT MAX(menu_id) as maxid FROM menu_info WHERE LENGTH(menu_id)=:VLENGTH AND menu_id LIKE :VUP_ID";
  public static String menu_info_SEL_ONE_BY_NONE = "SELECT MAX(menu_id) as maxid FROM menu_info WHERE LENGTH(menu_id)=3";
  public static String menu_info_INS_INTO_MENUINFO = "insert into menu_info (subsys_code,menu_id,menu_comment,menu_name,menu_path,oper_user,remove_tag,oper_time,check_auth,display,sort_no)values(:VSUBSYS_CODE,:VMENU_ID,:VMENU_COMMENT,:VMENU_NAME,:VMENU_PATH,:VOPER_USER,:VREMOVE_TAG,now(),:VCHECK_AUTH,:VDISPLAY,:VSORT_NO)";
  public static String menu_info_SEL_ALL_ONE_BY_NONE = "SELECT * FROM menu_info WHERE LENGTH(menu_id)=3 and subsys_code=:VSUBSYS_CODE order by sort_no,menu_id desc";
  public static String menu_info_SELECT_SON_BY_UP = "SELECT * FROM menu_info WHERE LENGTH(menu_id)=:VLENGTH AND menu_id LIKE :VUP_ID and subsys_code=:VSUBSYS_CODE order by sort_no,menu_id desc";
  public static String menu_info_SEL_ONE_BY_ID = "SELECT * FROM menu_info WHERE menu_id=:VMENU_ID";
  public static String menu_info_UPDATE_INTO_MENUINFO = "update menu_info set menu_comment=:VMENU_COMMENT,menu_name=:VMENU_NAME,menu_path=:VMENU_PATH,remove_tag=:VREMOVE_TAG,oper_user=:VOPER_USER,oper_time=now(),check_auth=:VCHECK_AUTH,display=:VDISPLAY,sort_no=:VSORT_NO where menu_id=:VMENU_ID";
  public static String authority_UPDATE_INTO_AUTHOER = "update authority set menu_name=:VMENU_NAME,menu_path=:VMENU_PATH where menu_id=:VMENU_ID";
  public static String menu_info_DELETE_INTO_AUTHOER = "delete from authority where menu_id=:VMENU_ID";
  public static String menu_info_DELETE_INTO_MENUINFO = "delete from menu_info where menu_id like :VMENU_ID";
  public static String menu_info_SEL_INFO_BY_PATH = "select menu_id,menu_name from menu_info where menu_path=:VPATH_TEMP";
  public static String menu_info_SEL_MENUID_BY_SUBSIX = "select menu_name from menu_info where menu_id=:VMENU_ID";
  public static String role_UPDATE_INTO_ROLE = "update role set menu_name=:VMENU_NAME,menu_path=:VMENU_PATH,display=:VDISPLAY,sort_no=:VSORT_NO where menu_id=:VMENU_ID";
  public static String authority_DEL_AUTH_BY_ROLE_NAME = "delete from authority where role_name = :VROLE_NAME";
  public static String menu_info_GET_MENU_INFO_BY_ID = "select menu_id,menu_name,menu_path,check_auth,sort_no,display from menu_info where menu_id = :VMENU_ID";
  public static String area_info_SEL_ONE_BY_NONE = "SELECT MAX(area_id) as maxid FROM area_info WHERE LENGTH(area_id)=3";
  public static String area_info_SELECT_MAXID = "SELECT MAX(area_id) as maxid FROM area_info WHERE LENGTH(area_id)=:VLENGTH AND area_id LIKE :VUP_ID";
  public static String area_info_SEL_BY_ID_FOR_NAME = "select * from area_info where area_id=:VAREA_ID";
  public static String area_info_INS_BY_AREA_INFO = "insert into area_info (area_id,area_code,area_name,area_comment,remove_tag,oper_user,add_date,oper_time)values (:VAREA_ID,:VAREA_CODE,:VAREA_NAME,:VAREA_COMMENT,:VREMOVE_TAG,:VOPER_USER,now(),now())";
  public static String area_info_SEL_ALL_ONE_BY_NONE = "SELECT * FROM area_info WHERE LENGTH(area_id)=3 order by area_id";
  public static String area_info_SELECT_SON_BY_UP = "SELECT * FROM area_info WHERE LENGTH(area_id)=:VLENGTH AND area_id LIKE :VUP_ID order by area_id";
  public static String area_info_UPDATE_BY_AREA_INFO = "update area_info set area_code=:VAREA_CODE,area_name=:VAREA_NAME,oper_user=:VOPER_USER,area_comment=:VAREA_COMMENT,remove_tag=:VREMOVE_TAG,oper_time=now() where area_id=:VAREA_ID";
  public static String area_info_DELETE_BY_AREA_INFO = "delete from  area_info where area_id=:VAREA_ID";
  public static String area_info_SELECT_BY_AREA_INFO_BY_AREA_NAME = "select area_name from area_info where area_id=:VAREA_ID";
  public static String area_info_SEL_AREA_INFO_COUNTRY = "SELECT area_id,area_name FROM area_info WHERE LENGTH(area_id)=3";
  public static String area_info_SEL_AREA_INFO_CITY = "select area_id,area_name from area_info where locate(:VAREA_CODE,area_id)=1 and length(area_id)>length(:VAREA_CODE) and length(area_id)-6<length(:VAREA_CODE)";
  public static String area_info_SEL_AREA_INFO_CITY_NAME = "select area_name from area_info where area_id=:VAREA_ID";
  public static String site_parameter_SEL_SITE_PARAMETER_BY_NAME = "SELECT param_id,param_name,param_value,param_comment,remark,checked,check_user,check_time,oper_user,oper_time,remove_tag FROM site_parameter where param_name like :VPARAM_NAME and param_comment like :VPARAM_COMMENT";
  public static String site_parameter_SEL_SITE_PARAMETER_BY_PARAM_NAME = "select param_name from site_parameter where param_name=:VPARAM_NAME";
  public static String site_parameter_SEL_SITE_PARAMETER_BY_MAX_ID = "select max(param_id) as maxid from site_parameter";
  public static String site_parameter_UPD_SITE_PARAMETER_INFO_BY_PARAM_ID = "UPDATE site_parameter SET param_name=:VPARAM_NAME,param_value=:VPARAM_VALUE,param_comment=:VPARAM_COMMENT,remove_tag=:VREMOVE_TAG  WHERE param_id=:VPARAM_ID";
  public static String site_parameter_DEL_SITE_PARAMETER_INFO_BY_PARAM_ID = "DELETE FROM site_parameter WHERE param_id=:VPARAM_ID";
  public static String site_parameter_INS_SITE_PARAMETER_BY_INFO = "insert into site_parameter (param_id,param_name,param_value,param_comment,oper_user,oper_time) values(:VPARAM_ID,:VPARAM_NAME,:VPARAM_VALUE,:VPARAM_COMMENT,:VOPER_USER,now())";
  public static String site_parameter_SEL_SITE_PARAMETER_BY_INFO = "SELECT param_id,param_name,param_value,param_comment,remark,checked,check_user,check_time,oper_user,oper_time,remove_tag FROM site_parameter";
  public static String site_parameter_SEL_SITE_PARAMETER_INFO_BY_PARAM_ID = "select param_id,param_name,param_value,param_comment,remark,checked,check_user,check_time,oper_user,oper_time,remove_tag FROM site_parameter where param_id=:VPARAM_ID";
  public static String site_parameter_SEL_SITE_PARAMETER_BY_PARAMETER = "select param_value as param from site_parameter where param_name=? ";
  public static String jobs_SEL_JOB_BY_KEYWORD_DAY = "SELECT j.pay,j.end_date,j.job_id,j.title,c.cust_type,j.cust_name,j.oper_time,j.cust_id,j.class_id,jc.store_path,jc.article_rule FROM jobs j INNER JOIN company c ON j.cust_id=c.cust_id INNER JOIN jobs_class jc ON j.class_id=jc.class_id WHERE j.title like :VKEYWORD and j.validity=1 AND j.remove_tag=1 AND (TO_DAYS(NOW())-TO_DAYS(start_date)<=7) AND start_date<=NOW() AND j.end_date >=NOW() ORDER BY j.oper_time DESC";
  public static String jobs_SEL_JOB_BY_KEYWORD_MONTH = "SELECT j.pay,j.end_date,j.job_id,j.title,c.cust_type,j.cust_name,j.oper_time,j.cust_id,j.class_id,jc.store_path,jc.article_rule FROM jobs j INNER JOIN company c ON j.cust_id=c.cust_id INNER JOIN jobs_class jc ON j.class_id=jc.class_id WHERE j.title like :VKEYWORD and j.validity=1 AND j.remove_tag=1 AND (TO_DAYS(NOW())-TO_DAYS(start_date)<=30) AND start_date<=NOW() AND j.end_date >=NOW() ORDER BY j.oper_time DESC";
  public static String jobs_SEL_JOB_BY_KEYWORD_YEAR = "SELECT j.pay,j.end_date,j.job_id,j.title,c.cust_type,j.cust_name,j.oper_time,j.cust_id,j.class_id,jc.store_path,jc.article_rule FROM jobs j INNER JOIN company c ON j.cust_id=c.cust_id INNER JOIN jobs_class jc ON j.class_id=jc.class_id WHERE j.title like :VKEYWORD and j.validity=1 AND j.remove_tag=1 AND (TO_DAYS(NOW())-TO_DAYS(start_date)<=365) AND start_date<=NOW() AND j.end_date >=NOW() ORDER BY j.oper_time DESC";
  public static String jobs_SEL_LATEST_JOB_INFO = "SELECT j.pay,j.end_date,j.job_id,j.title,j.cust_name,j.oper_time,j.cust_id,j.class_id,jc.store_path,jc.article_rule FROM jobs j INNER JOIN jobs_class jc ON j.class_id=jc.class_id WHERE j.validity=1 AND j.remove_tag=1 AND j.end_date >=NOW() ORDER BY j.oper_time DESC";
  public static String jobs_SEL_BY_INFO = "SELECT job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag FROM  jobs WHERE validity !=9 order by add_date desc";
  public static String jobs_INS_BY_INFO = "insert into  jobs (job_id,cust_id,cust_name,title,job_text,job_addr,pay,start_date,end_date,oper_user,oper_time,add_date) values(:VJOB_ID,:VCUST_ID,:VCUST_NAME,:VTITLE,:VJOB_TEXT,:VJOB_ADDR,:VPAY,now(),:VEND_DATE,:VOPER_USER,now(),now())";
  public static String jobs_SEL_BY_INFO_BY_CUST_ID = "SELECT job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag FROM  jobs where  validity !=9 and  cust_id=:VCUST_ID";
  public static String jobs_SEL_JOBS_INFO_BY_JOBS_ID = "SELECT job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag FROM  jobs where job_id=:VJOB_ID";
  public static String jobs_UPD_JOBS_INFO_BY_JOB_ID = "UPDATE jobs SET title=:VTITLE,job_text=:VJOB_TEXT,job_addr=:VJOB_ADDR,pay=:VPAY,end_date=:VEND_DATE,oper_user=:VOPER_USER  WHERE validity !=9 and  job_id=:VJOB_ID";
  public static String jobs_DEL_JOBS_INFO_BY_JOB_ID = "delete from jobs where job_id=:VJOB_ID";
  public static String jobs_DEL_JOBS_INFO_BY_UPDATE_ID = "UPDATE jobs SET  validity=9  WHERE  job_id=:VJOB_ID";
  public static String jobs_DEL_JOBS_INFO_BY_BATTCH_JOB_ID = "UPDATE jobs SET  validity=9  WHERE  job_id in (:VBATTCH_ID)";
  public static String jobs_SEL_INFO_BY_DELETED = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity=9";
  public static String jobs_REP_JOBS_INFO_BY_UPDATE_ID = "update jobs set validity=1 where  job_id=:VJOB_ID";
  public static String jobs_SEL_JOBS_INFO_FOR_DATE = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from  jobs where validity !=9 and start_date >= :VSTART_DATE and end_date <= :VEND_DATE and title like :VTITLE";
  public static String jobs_SEL_JOBS_INFO_FOR_NO_DATE = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from  jobs where validity !=9 and title like :VTITLE";
  public static String jobs_SEL_DELETED_INFO_FOR_DATE = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from  jobs where validity =9 and start_date >= :VSTART_DATE and end_date <= :VEND_DATE and title like :VTITLE";
  public static String jobs_SEL_BY_END_DATE = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity=9 and title like :VTITLE and end_date <= :VEND_DATE";
  public static String jobs_SEL_BY_SRART_DATE = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity=9 and title like :VTITLE and start_date >= :VSTART_DATE";
  public static String jobs_SEL_BY_TITLE = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity=9 and title like :VTITLE";
  public static String jobs_SEL_INFO_FOR_DATE = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from  jobs where validity !=9 and start_date >= :VSTART_DATE and end_date <= :VEND_DATE and start_date <= now() and end_date >= now() and title like :VTITLE and cust_id !=:VCUST_ID ";
  public static String jobs_SEL_INFO_BY_END_DATE = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity!=9 and title like :VTITLE and end_date <= :VEND_DATE and cust_id !=:VCUST_ID ";
  public static String jobs_SEL_INFO_BY_SRART_DATE = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity!=9 and title like :VTITLE and start_date >= :VSTART_DATE and cust_id !=:VCUST_ID ";
  public static String jobs_SEL_INFO_BY_TITLE = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity!=9 and title like :VTITLE and cust_id !=:VCUST_ID ";
  public static String jobs_SEL_JOB1 = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity!=9 and title like :VTITLE and cust_id !=:VCUST_ID  and end_date between :VEND_DATE  and :VEND_DATE2 ";
  public static String jobs_SEL_JOB2 = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity!=9 and title like :VTITLE and cust_id !=:VCUST_ID  and start_date between :VSTART_DATE  and :VSTART_DATE2 ";
  public static String jobs_SEL_JOB3 = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity!=9 and title like :VTITLE and cust_id !=:VCUST_ID and start_date between :VSTART_DATE  and :VSTART_DATE2 and end_date between :VEND_DATE  and :VEND_DATE2 ";
  public static String jobs_SEL_JOB4 = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity!=9 and title like :VTITLE and cust_id !=:VCUST_ID ";
  public static String jobs_SEL_INFO_FOR_DATE_ADMIN = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from  jobs where validity !=9 and start_date >= :VSTART_DATE and end_date <= :VEND_DATE and title like :VTITLE and cust_id =:VCUST_ID  order by oper_time desc";
  public static String jobs_SEL_INFO_BY_END_DATE_ADMIN = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity!=9 and title like :VTITLE and end_date <= :VEND_DATE and cust_id =:VCUST_ID order by oper_time desc";
  public static String jobs_SEL_INFO_BY_SRART_DATE_ADMIN = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity!=9 and title like :VTITLE and start_date >= :VSTART_DATE and cust_id =:VCUST_ID  order by oper_time desc";
  public static String jobs_SEL_INFO_BY_TITLE_ADMIN = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity!=9 and title like :VTITLE and cust_id =:VCUST_ID  order by oper_time desc";
  public static String jobs_SEL_INFO_FOR_MDATE = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from  jobs where validity !=9 and  cust_id=:VCUST_ID and ((start_date >= :VSTART_DATE and end_date >= :VSTART_DATE) and (start_date <= :VEND_DATE and end_date <= :VEND_DATE) and (start_date >= :VSTART_DATE and end_date <= :VEND_DATE)) and title like :VTITLE order by oper_time desc";
  public static String jobs_SEL_INFO_BY_END_MDATE = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity!=9 and  cust_id=:VCUST_ID and  title like :VTITLE and end_date <= :VEND_DATE order by oper_time desc";
  public static String jobs_SEL_INFO_BY_SRART_MDATE = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity!=9 and  cust_id=:VCUST_ID and title like :VTITLE and start_date >= :VSTART_DATE order by oper_time desc";
  public static String jobs_SEL_INFO_BY_MTITLE = "select job_id,cust_id,cust_name,title,job_text,validity,check_time,check_user,oper_user,oper_time,pay,job_addr,start_date,end_date,remove_tag from jobs where validity!=9 and  cust_id=:VCUST_ID and title like :VTITLE order by oper_time desc";
  public static String jobs_SEL_SEARCH_DEL_JOBS_INFO = "select u.user_id,u.cust_id,u.user_name,u.cust_name,j.job_id,j.title,j.add_date,j.start_date,j.end_date,j.validity from jobs j,user_info u where u.user_id = j.oper_user and u.cust_name like :VCUST_NAME and u.user_name like :VUSER_NAME and j.title like :VTITLE and j.start_date like :VSTART_DATE and j.end_date like :VEND_DATE and j.validity like :VVALIDITY order by j.add_date desc";
  public static String jobs_SEL_SEARCH_DEL_JOBS_INFO2 = "select u.user_id,u.cust_id,u.user_name,u.cust_name,j.job_id,j.title,j.add_date,j.start_date,j.end_date,j.validity from jobs j,user_info u where u.user_id = j.oper_user and u.cust_name like :VCUST_NAME and u.user_name like :VUSER_NAME and j.title like :VTITLE and j.start_date like :VSTART_DATE and j.end_date like :VEND_DATE and j.validity like :VVALIDITY and j.validity!='9' order by j.add_date desc";
  public static String jobs_DELETE_JOBS_BY_JOB_ID = "delete from jobs where job_id = :VJOB_ID";
  public static String jobs_REF_JOBS_INFO_BY_UPDATE_TIME = "update jobs set oper_time = now() where job_id = :VJOB_ID";
  public static String commen_SEL_BY_STORE = "select * from tf_f_commodity order by publish_date desc limit 50";
  public static String commen_SEL_BY_ENTERPRISE = "select * from tf_f_cust_group";
  public static String commen_SEL_BY_STOCKORDERLIST = "select * from tf_f_stockorder order by publish_date desc limit 50";
  public static String commen_SEL_BY_PRODUCT = "select * from tf_f_product order by publish_date desc limit 50";
  public static String commen_SEL_BY_BIDDING = "select * from tf_f_bidding order by publish_date desc limit 50";
  public static String commen_SEL_BY_SALE = "select * from tf_f_sale order by publish_date desc limit 50";
  public static String commen_SEL_BY_SALE_CUST = "select * from tf_f_cust_group a ,tf_f_sale b where a.cust_id = b.sale_unit and b.sale_unit=:VSALE_UNIT order by b.publish_date desc limit 50";
  public static String commen_SEL_BY_BIDDING_CUST = "select * from tf_f_bidding a,tf_f_cust_group b where a.cust_id=b.cust_id and a.cust_id=:VCUST_ID order by a.publish_date desc limit 50";
  public static String commen_SEL_BY_PRODUCT_CUST = "select * from tf_f_product a,tf_f_cust_group b where a.cust_id=b.cust_id and a.cust_id=:VCUST_ID order by a.publish_date desc limit 100";
  public static String commen_SEL_BY_STOCKORDER = "select * from tf_f_stockorder a,tf_f_cust_group b where a.cust_id = b.cust_id and a.cust_id=:VCUST_ID order by a.publish_date desc limit 100";
  public static String commen_SEL_CP_COMMODITY = "select * from tf_f_commodity a,tf_f_cust_group b where a.cust_id = b.cust_id and a.cust_id=:VCUST_ID order by a.publish_date desc limit 100";
  public static String menuinfo_UPDATE_BY_ALL_MENU = "update menuinfo set subsys_code=:VSUBSYS_CODE,menu_name=:VMENU_NAME,up_menu_id=:VUP_MENU_ID,menu_class=:VMENU_CLASS,menu_type=:VMENU_TYPE,module_id=:VMODULE_ID,in_param_code1=:VIN_PARAM_CODE1,in_param_value1=:VIN_PARAM_VALUE1,in_param_code2=:VIN_PARAM_CODE2,in_param_value2=:VIN_PARAM_VALUE2,in_param_code3=:VIN_PARAM_CODE3,in_param_value3=:VIN_PARAM_VALUE3,remove_tag=:VREMOVE_TAG,rsrv_str1=:VRSRV_STR1,rsrv_str2=:VRSRV_STR2,rsrv_str3=:VRSRV_STR3,rsrv_str4=:VRSRV_STR4,rsrv_str5=:VRSRV_STR5,rsrv_str6=:VRSRV_STR6,rsrv_str7=:VRSRV_STR7,rsrv_str8=:VRSRV_STR8,rsrv_str9=:VRSRV_STR9,rsrv_str0=:VRSRV_STR0,in_staff_id=:VIN_STAFF_ID,in_date=now(),remark=:VREMARK where menu_id=:VMENU_ID";
  public static String menuinfo_DEL_BY_ALL_MENU = "delete from menuinfo where menu_id=:VMENU_ID";
  public static String menuinfo_CHECK_MENU_ID = "select * from menuinfo where menu_id=:VMENU_ID";
  public static String menuinfo_SEL_THREE_BY_UP = "select b.module_file,b.module_dir,a.* from menuinfo a,moduleinfo b where a.module_id=b.module_id and a.up_menu_id=:VUP_MENU_ID  order by a.rsrv_str0 desc";
  public static String menuinfo_SEL_CLASS_BY_MENU_ID = "select * from menuinfo where menu_id=:VMENU_ID ";
  public static String menuinfo_SEL_BY_MENU_CLASS = "select * from menuinfo where subsys_code=:VSUBSYS_CODE and menu_class=:VMENU_CLASS ";
  public static String menuinfo_SEL_NOEXIST_MENU_BY_CUSTCLASS = "select * from menuinfo where up_menu_id=:VUP_MENU_ID and subsys_code=:VSUBSYS_CODE";
  public static String menuinfo_SEL_NOEXIST_MENU_BY_CUSTCLASS_FOR = "select * from menuinfo where up_menu_id=:VUP_MENU_ID and subsys_code=:VSUBSYS_CODE and menu_id in(select menu_id from rightinfo where cust_class in(select cust_class from tf_f_cust_level where cust_id=:VCUST_ID))";
  public static String menuinfo_SEL_BY_UP_JSON = "select menu_id,subsys_code,menu_name,menu_class,up_menu_id from menuinfo where subsys_code =:VSUBSYS_CODE and up_menu_id =:VMENU_ID";
  public static String menuinfo_SEL_NO_LINK_MENUID = "select * from menuinfo where menu_id not in (select link_menu_id from td_b_linkmenu where menu_id=:VMENU_ID) and menu_class='3' and subsys_code!='B2B' and subsys_code!='COM' order by subsys_code asc";
  public static String menuinfo_SEL_BY_THREE_CLASS = "select menu_id,menu_name,subsys_code from menuinfo where menu_class='3' order by subsys_code desc";
  public static String menuinfo_SEL_BY_SUBSYSCODE = "select * from menuinfo where subsys_code=:VSUBSYS_CODE and menu_class='1'";
  public static String menuinfo_SEL_BY_UP_MENU_ID = "select * from menuinfo where up_menu_id=:VUP_MENU_ID order by rsrv_str0 asc";
  public static String menuinfo_SEL_SPEC_MENU_ID = "select * from menuinfo where up_menu_id=:VUP_MENU_ID and menu_id not in (select link_menu_id from td_b_linkmenu where menu_id=:VMENU_ID)";
  public static String menuinfo_SEL_BY_PK = "select * from menuinfo where menu_id=:VMENU_ID";
  public static String menuinfo_SEL_BY_IN_CLASS = "select * from menuinfo where subsys_code =:VSUBSYS_CODE and menu_class =:VMENU_CLASS and menu_id in (select t.menu_id from rightinfo t where t.cust_class =:VCUST_CLASS and t.end_date > now()))";
  public static String menuinfo_SEL_BY_NOT_CLASS = "select * from menuinfo where subsys_code =:VSUBSYS_CODE and menu_class =:VMENU_CLASS";
  public static String menuinfo_SEL_BY_CLASS_JSON = "select menu_id,menu_name,menu_class,up_menu_id from menuinfo where subsys_code =:VSUBSYS_CODE and menu_class =:VMENU_CLASS";
  public static String menuinfo_SEL_BY_RIGHT_JSON = "select menu_id,menu_name from menuinfo where subsys_code =:VSUBSYS_CODE and menu_class =:VMENU_CLASS and menu_id in(select menu_id from rightinfo where cust_class=:VCUST_CLASS)";
  public static String menuinfo_SEL_BY_CLASSONE = "select * from menuinfo where menu_class=:VMENU_CLASS and subsys_code in ('OA','CRM','CTR','HELP')";
  public static String menuinfo_SEL_BY_DOWN = "select * from menuinfo where up_menu_id= :VUP_MENU_ID and subsys_code in ('OA','CRM','CTR','HELP')";
  public static String menuinfo_SEL_BY_CLASS_STAFF = "select * from menuinfo where ((menu_id in (select menu_id from rightinfo where cust_class=:VCUST_CLASS )) or ('admin'=:VSTAFFID)) and menu_class=:VCLASS order by subsys_code desc, in_date";
  public static String menuinfo_SEL_BY_CLASS_SYS = "select * from menuinfo where ((menu_id in (select menu_id from rightinfo where cust_class=:VUSER_CLASS and '0'=:VUSER_TYPE)) or ('1'=:VSTAFFID and '1'=:VUSER_TYPE) or (''= :VSTAFF_ID) or (menu_id in (select menu_id from td_b_roleright where role_code=:VROLE_CODE))) and  menu_class=:VCLASS and subsys_code=:VSUBSYS_CODE order by abs(rsrv_str0)";
  public static String menuinfo_SEL_BY_CLASS_STAFF_UP = "select * from menuinfo where ((menu_id in (select menu_id from rightinfo where cust_class=:VCUST_CLASS and '0'=:VUSER_TYPE)) or ('1'=:VSTAFFID) or menu_id in (select menu_id from td_b_roleright where role_code=:VROLE_CODE)) and menu_class=:VCLASS and up_menu_id=:VUP_ITEM_ID  order by abs(rsrv_str0)";
  public static String menuinfo_SEL_All_ONE_CLASS_MENU = "select * from menuinfo where subsys_code=:VSERVER_ID and up_menu_id=:VUP_MENU_ID";
  public static String menuinfo_SEL_MENU_ID = "select menu_id,menu_name from menuinfo where subsys_code=:VSUBSYS_CODE and up_menu_id=:VMENU_ID and menu_id in(select t.menu_id from rightinfo t where t.cust_class =:VCUST_CLASS and t.end_date>now())";
  public static String menuinfo_SEL_MENU_RIGHT = "select t.menu_id,t.menu_name from menuinfo t,td_b_roleright r where t.menu_id=r.menu_id and r.menu_id=:VMENU_ID and r.cust_id=:VCUST_ID and r.role_code=:VROLE_CODE";
  public static String moduleinfo_SEL_BY_PK = "select * from moduleinfo where module_id=:VMODULE_ID";
  public static String moduleinfo_INS_MOD_BY_ALL = "insert into moduleinfo (module_id,module_name,module_file,module_dir,module_type,rsrv_str1,rsrv_str2,rsrv_str3,rsrv_str4,rsrv_str5,rsrv_str6,rsrv_str7,rsrv_str8,rsrv_str9,rsrv_str0,in_staff_id,in_date,remark) values (:VMODULE_ID,:VMODULE_NAME,:VMODULE_FILE,:VMODULE_DIR,:VMODULE_TYPE,:VRSRV_STR1,:VRSRV_STR2,:VRSRV_STR3,:VRSRV_STR4,:VRSRV_STR5,:VRSRV_STR6,:VRSRV_STR7,:VRSRV_STR8,:VRSRV_STR9,:VRSRV_STR0,:VIN_STAFF_ID,now(),:VREMARK)";
  public static String moduleinfo_INS_BY_ALL = "insert into moduleinfo ( MODULE_ID, MODULE_NAME, MODULE_FILE, MODULE_DIR, MODULE_TYPE, RSRV_STR1, RSRV_STR2, RSRV_STR3, RSRV_STR4, RSRV_STR5, RSRV_STR6, RSRV_STR7, RSRV_STR8, RSRV_STR9, RSRV_STR0, IN_STAFF_ID, IN_DATE, REMARK) values( :VMODULE_ID,:VMODULE_NAME,:VMODULE_FILE,:VMODULE_DIR,:VMODULE_TYPE,:VRSRV_STR1,:VRSRV_STR2,:VRSRV_STR3,:VRSRV_STR4,:VRSRV_STR5,:VRSRV_STR6,:VRSRV_STR7,:VRSRV_STR8,:VRSRV_STR9,:VRSRV_STR0,:VIN_STAFF_ID,now(),:VREMARK )";
  public static String moduleinfo_UPDATE_MOD_BY_ALL = "update moduleinfo set module_name=:VMODULE_NAME,module_file=:VMODULE_FILE,module_dir=:VMODULE_DIR,module_type=:VMODULE_TYPE,rsrv_str1=:VRSRV_STR1,rsrv_str2=:VRSRV_STR2,rsrv_str3=:VRSRV_STR3,rsrv_str4=:VRSRV_STR4,rsrv_str5=:VRSRV_STR5,rsrv_str6=:VRSRV_STR6,rsrv_str7=:VRSRV_STR7,rsrv_str8=:VRSRV_STR8,rsrv_str9=:VRSRV_STR9,rsrv_str0=:VRSRV_STR0,in_staff_id=:VIN_STAFF_ID,in_date=now(),remark=:VREMARK where module_id=:VMODULE_ID";
  public static String tradetype_INS_TRADETYPE_INFO = "insert into tradetype(trade_type_code,trade_name,bpm_id,judge_rights,trade_kind,cancel_tag,transe_type,enable_tag,succeed_fwd,error_fwd,start_date,end_date,rsrv_str1,rsrv_str2,rsrv_str3,rsrv_str4,rsrv_str5,rsrv_str6,rsrv_str7,rsrv_str8,rsrv_str9,rsrv_str0,in_date,remark)values(:VTRADE_TYPE_CODE,:VTRADE_NAME,:VBPM_ID,:VJUDGE_RIGHTS,:VTRADE_KIND,:VCANCEL_TAG,:VTRANSE_TYPE,:VENABLE_TAG,:VSUCCEED_FWD,:VERROR_FWD,:VSTART_DATE,:VEND_DATE,:VRSRV_STR1,:VRSRV_STR2,:VRSRV_STR3,:VRSRV_STR4,:VRSRV_STR5,:VRSRV_STR6,:VRSRV_STR7,:VRSRV_STR8,:VRSRV_STR9,:VRSRV_STR0,now(),:VREMARK)";
  public static String tradetype_DEL_TRADETYPE_BY_TRADE_TYPE_CODE = "delete from tradetype where trade_type_code = :VTRADE_TYPE_CODE";
  public static String tradetype_SEL_BY_PK = "select * from tradetype where trade_type_code = :VTRADETYPECODE";
  public static String tradetype_UPDATE_TRADETYPE_INFO = "update tradetype set trade_name=:VTRADE_NAME,bpm_id=:VBPM_ID,judge_rights=:VJUDGE_RIGHTS,trade_kind=:VTRADE_KIND,cancel_tag=:VCANCEL_TAG,transe_type=:VTRANSE_TYPE,enable_tag=:VENABLE_TAG,succeed_fwd=:VSUCCEED_FWD,error_fwd=:VERROR_FWD,start_date=:VSTART_DATE,end_date=:VEND_DATE,rsrv_str1=:VRSRV_STR1,rsrv_str2=:VRSRV_STR2,rsrv_str3=:VRSRV_STR3,rsrv_str4=:VRSRV_STR4,rsrv_str5=:VRSRV_STR5,rsrv_str6=:VRSRV_STR6,rsrv_str7=:VRSRV_STR7,rsrv_str8=:VRSRV_STR8,rsrv_str9=:VRSRV_STR9,rsrv_str0=:VRSRV_STR0,remark=:VREMARK where trade_type_code=:VTRADE_TYPE_CODE";
  public static String bpmdefinition_UPDATE_BPM_INFO = "update bpmdefinition set bpm_id=:VBPM_ID,node_id=:VNODE_ID,node_type=:VNODE_TYPE,node_sequence=:VNODE_SEQUENCE,node_class=:VNODE_CLASS,node_method=:VNODE_METHOD,out_query=:VOUT_QUERY,out_buffer=:VOUT_BUFFER,undo_tag=:VUNDO_TAG,unde_class=:VUNDE_CLASS,undo_method=:VUNDO_METHOD,undo_out_query=:VUNDO_OUT_QUERY,undo_out_buffer=:VUNDO_OUT_BUFFER,rsrv_str1=:VRSRV_STR1,rsrv_str2=:VRSRV_STR2,rsrv_str3=:VRSRV_STR3,rsrv_str4=:VRSRV_STR4,rsrv_str5=:VRSRV_STR5,rsrv_str6=:VRSRV_STR6,rsrv_str7=:VRSRV_STR7,rsrv_str8=:VRSRV_STR8,rsrv_str9=:VRSRV_STR9,rsrv_str0=:VRSRV_STR0,remark=:VREMARK where trade_type_code=:VTRADE_TYPE_CODE";
  public static String bpmdefinition_UPDATE_BPM_INFO_1 = "update bpmdefinition set bpm_id=:VBPM_ID,node_id=:VNODE_ID,node_type=:VNODE_TYPE,node_sequence=:VNODE_SEQUENCE,node_class=:VNODE_CLASS,node_method=:VNODE_METHOD,out_query=:VOUT_QUERY,out_buffer=:VOUT_BUFFER,undo_tag=:VUNDO_TAG,unde_class=:VUNDE_CLASS,undo_method=:VUNDO_METHOD,undo_out_query=:VUNDO_OUT_QUERY,undo_out_buffer=:VUNDO_OUT_BUFFER,rsrv_str1=:VRSRV_STR1,rsrv_str2=:VRSRV_STR2,rsrv_str3=:VRSRV_STR3,rsrv_str4=:VRSRV_STR4,rsrv_str5=:VRSRV_STR5,rsrv_str6=:VRSRV_STR6,rsrv_str7=:VRSRV_STR7,rsrv_str8=:VRSRV_STR8,rsrv_str9=:VRSRV_STR9,rsrv_str0=:VRSRV_STR0,remark=:VREMARK where trade_type_code=:VTRADE_TYPE_CODE and bpm_id =:VBPM_ID and  node_class=:VNODE_CLASS  and  node_method=:VNODE_METHOD";
  public static String bpmdefinition_INS_BPM_INFO = "insert into bpmdefinition(trade_type_code,bpm_id,node_id,node_type,node_sequence,node_class,node_method,out_query,out_buffer,undo_tag,unde_class,undo_method,undo_out_query,undo_out_buffer,rsrv_str1,rsrv_str2,rsrv_str3,rsrv_str4,rsrv_str5,rsrv_str6,rsrv_str7,rsrv_str8,rsrv_str9,rsrv_str0,in_date,remark)values(:VTRADE_TYPE_CODE,:VBPM_ID,:VNODE_ID,:VNODE_TYPE,:VNODE_SEQUENCE,:VNODE_CLASS,:VNODE_METHOD,:VOUT_QUERY,:VOUT_BUFFER,:VUNDO_TAG,:VUNDE_CLASS,:VUNDO_METHOD,:VUNDO_OUT_QUERY,:VUNDO_OUT_BUFFER,:VRSRV_STR1,:VRSRV_STR2,:VRSRV_STR3,:VRSRV_STR4,:VRSRV_STR5,:VRSRV_STR6,:VRSRV_STR7,:VRSRV_STR8,:VRSRV_STR9,:VRSRV_STR0,now(),:VREMARK)";
  public static String bpmdefinition_DEL_BPM_BY_TRADE_TYPE_CODE = "delete from bpmdefinition where trade_type_code=:VTRADE_TYPE_CODE and bpm_id=:VBPM_ID and node_class=:VNODE_CLASS and node_method=:VUNDO_METHOD";
  public static String bpmdefinition_SEL_ALL_BPM = "select * from bpmdefinition order by trade_type_code asc";
  public static String bpmdefinition_SEL_BY_PK = "select * from bpmdefinition where trade_type_code=:VTRADETYPECODE order by node_sequence desc";
  public static String bpmdefinition_SEL_BY_PK_1 = "select * from bpmdefinition where trade_type_code like :VNODE_CLASS or node_class like :VNODE_CLASS or  node_method like :VNODE_CLASS order by node_sequence desc";
  public static String bpmdefinition_SEL_BY_TYPE = "select * from bpmdefinition where trade_type_code=:VTRADETYPECODE and rsrv_str6=:VRSRV_STR6 order by node_sequence desc";
  public static String menuinfo_INS_BY_ALL_MENU = "insert into menuinfo (subsys_code,menu_id,menu_name,up_menu_id,menu_class,menu_type,module_id,in_param_code1,in_param_value1,in_param_code2,in_param_value2,in_param_code3,in_param_value3,remove_tag,rsrv_str1,rsrv_str2,rsrv_str3,rsrv_str4,rsrv_str5,rsrv_str6,rsrv_str7,rsrv_str8,rsrv_str9,rsrv_str0,in_staff_id,in_date,remark) values (:VSUBSYS_CODE,:VMENU_ID,:VMENU_NAME,:VUP_MENU_ID,:VMENU_CLASS,:VMENU_TYPE,:VMODULE_ID,:VIN_PARAM_CODE1,:VIN_PARAM_VALUE1,:VIN_PARAM_CODE2,:VIN_PARAM_VALUE2,:VIN_PARAM_CODE3,:VIN_PARAM_VALUE3,:VREMOVE_TAG,:VRSRV_STR1,:VRSRV_STR2,:VRSRV_STR3,:VRSRV_STR4,:VRSRV_STR5,:VRSRV_STR6,:VRSRV_STR7,:VRSRV_STR8,:VRSRV_STR9,:VRSRV_STR0,:VIN_STAFF_ID,now(),:VREMARK)";
  public static String company_SEL_BY_NAME = "select cust_id from company where cust_name like :VCUST_NAME";
  public static String company_UPDATE_CUST_STATE = "update comapny set cust_state =:VCUST_STATE where cust_id =:VCUST_ID";
  public static String company_SEL_COMPANY_BY_CUST_ID = "select eparchy_code,class_id from company where cust_id=:VCUST_ID";
  public static String company_SEL_CUST_STATE_BY_CUST_ID = "SELECT cust_state FROM company WHERE CUST_ID = :VCUST_ID";
  public static String company_GET_CUST_NAME_BY_CUST_NAME = "SELECT CUST_NAME FROM company WHERE CUST_ID = :VCUST_ID";
  public static String company_SEL_COMPANY_COMMAND_STATE_IS_ONE = "select a.cust_name, a.display, a.list_top, a.group_contact_phone, a.commend, a.cust_id, a.cust_state, a.cust_aim, a.email, a.company_address, a.website, a.add_date, b.contact_name from company a,user b where a.cust_id = b.cust_id and a.cust_type='1' and a.cust_state in ('1','9') order by add_date desc";
  public static String company_SEL_COMPANY_COMMAND_STATE_ZHIDING_TUIJIAN = "select a.level_name, a.level_id, a.display, a.list_top, a.group_contact_phone, a.commend, a.cust_id, a.cust_state, a.cust_aim, a.email, a.company_address, a.website, a.add_date, a.cust_name, b.contact_name from company a,user_info b where a.cust_id = b.cust_id and a.cust_type not in ('0') and a.cust_state = '1' order by a.cust_id desc";
  public static String company_SEL_COMPANY_STATE_THREE = "select a.cust_name,a.group_contact_phone, a.cust_id, a.cust_state, a.cust_aim, a.email, a.add_date, b.contact_name from company a,user b where a.cust_id = b.cust_id and a.cust_type='1' and a.cust_state ='5' order by add_date desc";
  public static String company_SEL_COMPANY_STATE_ONE_FOUR = "select a.cust_name, a.group_contact_phone, a.commend, a.cust_id, a.cust_state, a.cust_aim, a.email, a.company_address, a.website, a.add_date, b.contact_name from company a,user b where a.cust_id = b.cust_id and a.cust_type='1' and a.cust_state in('1','4') order by add_date desc";
  public static String company_SEL_CUST_LIST_USER_ORDER_BY = "select a.cust_name, a.cust_id, a.cust_state, a.cust_aim, a.group_contact_phone, a.email, a.add_date, b.contact_name from company a,user b where a.cust_id = b.cust_id and a.cust_state in('0','2') and a.cust_type='1' order by add_date asc";
  public static String company_SEL_CUST_LIST_USER_ORDER_BY_ONE = "select a.commend, a.cust_id, a.cust_state, a.cust_aim, a.group_contact_phone, a.email, a.add_date, b.contact_name from company a,user b where a.cust_id = b.cust_id and a.cust_state =:VSTATE_CODE order by add_date desc";
  public static String company_UPDATE_COMPANY_COMMEND_CUST_ID = "update company set commend='0'  where cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_COMMEND_CUST_ID_DONGJIE = "update company a, user b set a.cust_state='4', b.user_state='4' where a.cust_id=b.cust_id and a.cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_COMMEND_CUST_ID_JIE = "update company a, user b set a.cust_state='1', b.user_state='1' where a.cust_id=b.cust_id and a.cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_COMMEND_CUST_ID_OFF = "update company set commend='1' where cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_LIST_TOP_UP = "update company set list_top = '0' where cust_id = :VCUST_ID";
  public static String company_UPDATE_COMPANY_LIST_TOP_ZHENG = "update company set list_top = '1' where cust_id = :VCUST_ID";
  public static String company_UPDATE_COMPANY_INFO_DISPLAY_YES = "update company set display = '0' where cust_id = :VCUST_ID";
  public static String company_UPDATE_COMPANY_INFO_DISPLAY_NO = "update company set display = '1' where cust_id = :VCUST_ID";
  public static String company_UPDATE_COMPANY_LIST_TOP_DOWN = "update company set list_top = '2' where cust_id = :VCUST_ID";
  public static String company_UPDATE_COMPANY_INFO_DELETE_YES = "update company a,user b set a.cust_state = '9' , a.oper_user=:VOPER_USER, a.oper_time=now() ,b.user_state='9', b.user_state_date=now(), b.oper_time=now(), b.oper_user=:VOPER_USER  where a.cust_id=b.cust_id and a.cust_id = :VCUST_ID";
  public static String company_UPDATE_COMPANY_INFO_DELETE_NO = "update company a,user b set a.cust_state = '1' ,b.user_state = '1' ,b.user_state_date=now(), b.oper_time=now(), b.oper_user=:VOPER_USER, a.oper_user=:VOPER_USER, a.oper_time=now() where a.cust_id = :VCUST_ID and a.cust_id=b.cust_id";
  public static String company_UPDATE_COMPANY_STATE_YES = "update company a,user b set a.cust_state = '3' , a.oper_user=:VOPER_USER, a.oper_time=now() ,b.user_state='3', b.user_state_date=now(), b.oper_time=now(), b.oper_user=:VOPER_USER where a.cust_id=b.cust_id and a.cust_id = :VCUST_ID";
  public static String company_UPDATE_COMPANY_STATE_NO = "update company a ,user b set a.cust_state = '1' , a.oper_user=:VOPER_USER, a.oper_time=now() ,b.user_state='1', b.user_state_date=now(), b.oper_time=now(), b.oper_user=:VOPER_USER where a.cust_id = :VCUST_ID and a.cust_id=b.cust_id";
  public static String company_SEL_COMPANY_BY_CUSTID_INFOSEE = "select *  from company where cust_type='1' and cust_id = :VCUST_ID";
  public static String company_UPDATE_COMPANY_STATE = "update company a set a.cust_state='1',a.auto_state=:VAUTO_STATE,a.dis_state=:VDIS_STATE,a.back_reason='',a.check_time=now(),a.check_user=:VSESSION_USER_ID where a.cust_id=:VCUST_ID";
  public static String company_SHENGQINGZHUXIAO_COMPANY = "update company set cust_state='5',oper_user=:VUSER_ID,oper_time=now() where cust_id=:VCUST_ID";
  public static String company_SEL_BY_KEYWORD_SHENHE = "select a.cust_id, a.cust_name, a.cust_state, a.cust_aim, a.group_contact_phone, a.email, a.add_date, b.contact_name from company a,user b where a.cust_id = b.cust_id and a.cust_name like :VKEYWORD and a.cust_state in('0','2') and a.cust_type='1' order by add_date asc";
  public static String company_SEL_KEYWORD_BY_COMPANYRECOMMED = "select a.level_id, a.level_name, a.display, a.list_top, a.group_contact_phone, a.commend, a.cust_id, a.cust_state, a.cust_aim,a.cust_name, a.email, a.company_address, a.website, a.add_date, b.contact_name from company a,user_info b where a.cust_id = b.cust_id and a.cust_type not in('0') and a.cust_state = '1' and a.cust_name like :VKEYWORD  order by a.cust_id desc";
  public static String company_SEL_BY_KEYWORD_OPRATE = "select a.cust_name, a.display, a.list_top, a.group_contact_phone, a.commend, a.cust_id, a.cust_state, a.cust_aim, a.email, a.company_address, a.website, a.add_date, b.contact_name from company a,user b where a.cust_id = b.cust_id and a.cust_type='1' and a.cust_state in ('1','9') and a.cust_name like :VKEYWORD order by add_date desc";
  public static String company_SEL_BY_KEYWORD_BLOCKED = "select a.cust_name, a.group_contact_phone, a.commend, a.cust_id, a.cust_state, a.cust_aim, a.email, a.company_address, a.website, a.add_date, b.contact_name from company a,user b where a.cust_id = b.cust_id and a.cust_state in('1','4') and a.cust_type='1' and a.cust_name like :VKEYWORD order by add_date desc";
  public static String company_SEL_BY_KEYWORD_AFFIRM = "select  a.cust_name, a.group_contact_phone, a.cust_id, a.cust_state, a.cust_aim, a.email, a.add_date, b.contact_name from company a,user b where a.cust_id = b.cust_id and a.cust_type='1' and a.cust_state ='5' and a.cust_name like :VKEYWORD  order by add_date desc";
  public static String company_SEL_ALL_COMPANY_INFO = "select cust_id,cust_name,company_address,group_contact_phone,add_date,cust_state from company where cust_type='1' order by cust_state desc";
  public static String company_SEL_ALL_COMPANY_INFO_KEYWORD = "select cust_id,cust_name,company_address,group_contact_phone,add_date,cust_state from company where cust_type='1' and cust_name like :VKEYWORD  order by cust_state asc";
  public static String company_SEL_RICHES_BY_CUSTID = "select level_id, level_name, property_value, integration, xunibi, oper_user, oper_time from company where cust_type not in ('0') and cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_PROPERTYINFO = "update company set level_name=:VLEVEL_NAME,  property_value=:VPROPERTY_VALUE, integration=:VINTEGRATION, xunibi=:VXUNIBI, oper_user=:VOPER_USER, level_id=:VLEVEL_ID,  oper_time=now() where cust_id=:VCUST_ID";
  public static String company_SELECT_COMPANY_INFO_ALL = "select * from company where cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_CONTENT_INFO_ALL = "update company set pspt_type_code=:VPSPT_TYPE_CODE,  pspt_id=:VPSPT_ID, pspt_addr=:VPSPT_ADDR, user_count=:VUSER_COUNT, company_address=:VCOMPANY_ADDRESS ,eparchy_code=:VEPARCHY_CODE, city_code=:VCITY_CODE, class_id=:VCLASS_ID, group_attr=:VGROUP_ATTR, client_status=:VCLIENT_STATUS, post_code=:VPOST_CODE, website=:VWEBSITE, fax_nbr=:VFAX_NBR, email=:VEMAIL, group_contact_phone=:VGROUP_CONTACT_PHONE, cell_phone=:VCELL_PHONE, calling_type_code=:VCALLING_TYPE_CODE, calling_sub_type_code=:VCALLING_SUB_TYPE_CODE, enterprise_type_code=:VENTERPRISE_TYPE_CODE, enterprise_size_code=:VENTERPRISE_SIZE_CODE, juristic_cust_id=:VJURISTIC_CUST_ID, juristic=:VJURISTIC, juristic_type_code=:VJURISTIC_TYPE_CODE, all_emp_count=:VALL_EMP_COUNT,china_emp_count=:VCHINA_EMP_COUNT, local_emp_count=:VLOCAL_EMP_COUNT, group_memo=:VGROUP_MEMO, reg_money=:VREG_MONEY, cust_aim=:VCUST_AIM, scope=:VSCOPE, enterprise_scope=:VENTERPRISE_SCOPE where cust_id=:VCUST_ID";
  public static String company_UPDATE_REFRESH_TIME = "update company set last_time=now() where cust_id=:VCUST_ID";
  public static String company_INS_CUSTID_BY_COMPANY = "update company set images=:VFILE_PATH where cust_id=:VATTACH_ROOT_ID";
  public static String company_DELETE_BY_ID_FROM_COMPANY = "update company set images='' where cust_id =:VCUST_ID";
  public static String company_SEL_BY_USERID_FROM_SCORE_LIST = "select level_name,level_id,integration from company where cust_id=:VCUST_ID";
  public static String company_SEL_CUSTRAGE_BY_CUST_ID = "select cust_rage from company where cust_id=:VCUST_ID";
  public static String company_SEL_COMPANYINFO_BY_CUSTID_INFOSEE = "select a.type,a.exhibition_period,a.logo_img,a.level_id,a.level_name,a.commend,a.email, a.cust_name, a.dis_state, a.juristic, a.abbreviated, a.enterprise_type_code, a.eparchy_code, a.group_contact_phone, a.fax_nbr, a.company_address, a.post_code, a.pspt_id, a.website, a.bank_deposit, a.bank_account, a.banking_account, a.cust_rage, a.user_count, a.certification, a.company_scope, a.cust_supply, a.cust_buying, a.register_attach, a.back_reason, a.info_auth, a.auto_state, a.oper_time, a.auth_date, a.cust_state from company a where a.cust_id=:VCUST_ID ";
  public static String company_SEL_COMPANY_SIMPLEINFO_BY_CUST_ID = "select c.* from company c left join data_parameter d on c.enterprise_type_code=d.param_value and d.category_code='qyxz' where c.cust_id =:VCUST_ID";
  public static String company_SEL_COMPANY_AUTHDATE_BY_CUSTID = "select auth_date,cust_state from company where cust_id=:VCUST_ID";
  public static String company_UPDATE_DISSTATE_ZERO = "update company set dis_state='1',check_time=now(),check_user=:VSESSION_USER_ID where cust_id=:VCUST_ID";
  public static String company_UPDATE_DISSTATE_ONE = "update company set dis_state='0',check_time=now(),check_user=:VSESSION_USER_ID where cust_id=:VCUST_ID";
  public static String company_UPDATE_SHENHEFANGSHI_ZERO = "update company set auto_state='1',check_time=now(),check_user=:VSESSION_USER_ID where cust_id=:VCUST_ID";
  public static String company_UPDATE_SHENHEFANGSHI_ONE = "update company set auto_state='0',check_time=now(),check_user=:VSESSION_USER_ID where cust_id=:VCUST_ID";
  public static String company_UPDATE_JIESUO = "update company set cust_state='1',check_time=now(),check_user=:VSESSION_USER_ID where cust_id=:VCUST_ID";
  public static String company_UPDATE_SUODING = "update company set cust_state='4',check_time=now(),check_user=:VSESSION_USER_ID where cust_id=:VCUST_ID";
  public static String company_UPDATE_UPDATE_ZHUXIAO = "update company set cust_state='3',check_time=now(),check_user=:VSESSION_USER_ID where cust_id=:VCUST_ID";
  public static String company_UPDATE_UPDATE_QUXIAOZHUXIAO = "update company set cust_state='1',check_time=now(),check_user=:VSESSION_USER_ID where cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_LEVEL_INFO = "update company set level_name=:VLEVEL_NAME,level_id=:VLEVEL_ID,check_time=now(),check_user=:VSESSION_USER_ID where cust_id=:VCUST_ID";
  public static String company_UPDATE_COMMEND_ONE = "update company set commend='0',check_time=now(),check_user=:VSESSION_USER_ID where cust_id=:VCUST_ID";
  public static String company_UPDATE_COMMEND_ZERO = "update company set commend='1',check_time=now(),check_user=:VSESSION_USER_ID where cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_STETA = "update company set info_auth=:VINFO_AUTH,oper_user=:VSESSION_USER_ID,oper_time=now() where cust_id=:VSESSION_CUST_ID";
  public static String company_UPDATE_INFOAUTH_BY_COMPANY_CUSTID = "update company set info_auth='3',company_auth_id=:VCOMPANY_AUTH_ID,oper_user=:VOPER_USER,oper_time=now() where cust_id=:VCUST_ID";
  public static String company_UPDATE_INFOAUTH_BY_COMPANY_CUSTID_TO_SAVE = "update company set info_auth='4',company_auth_id=:VCOMPANY_AUTH_ID,oper_user=:VOPER_USER,oper_time=now() where cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_ALL_INFOAUTH_TOW = "update company set info_auth='3',type=:VTYPE,exhibition_period=:VEXHIBITION_PERIOD,logo_img=:VLOGO_IMG,cust_supply=:VXIAOSHOU_ALL_NEWS_ID,cust_buying=:VCAIGOU_ALL_NEWS_ID,oper_user=:VUSER_ID,oper_time=now(),juristic=:VJURISTIC,enterprise_type_code=:VENTERPRISE_TYPE_CODE,eparchy_code=:VEPARCHY_CODE,group_contact_phone=:VGROUP_CONTACT_PHONE,fax_nbr=:VFAX_NBR,website=:VWEBSITE,post_code=:VPOST_CODE,company_address=:VCOMPANY_ADDRESS,bank_deposit=:VBANK_DEPOSIT,bank_account=:VBANK_ACCOUNT,banking_account=:VBANKING_ACCOUNT,user_count=:VUSER_COUNT,certification=:VCERTIFICATION ,company_scope=:VCOMPANY_SCOPE,email=:VEMAIL where cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_ALL_INFOAUTH_TOWWW = "update company set info_auth='3',logo_img=:VLOGO_IMG,cust_supply=:VXIAOSHOU_ALL_NEWS_ID,cust_buying=:VCAIGOU_ALL_NEWS_ID,oper_user=:VUSER_ID,oper_time=now(),juristic=:VJURISTIC,enterprise_type_code=:VENTERPRISE_TYPE_CODE,eparchy_code=:VEPARCHY_CODE,group_contact_phone=:VGROUP_CONTACT_PHONE,fax_nbr=:VFAX_NBR,website=:VWEBSITE,post_code=:VPOST_CODE,company_address=:VCOMPANY_ADDRESS,bank_deposit=:VBANK_DEPOSIT,bank_account=:VBANK_ACCOUNT,banking_account=:VBANKING_ACCOUNT,user_count=:VUSER_COUNT,certification=:VCERTIFICATION ,company_scope=:VCOMPANY_SCOPE,email=:VEMAIL where cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_FEIGUANJIAN_INFOAUTH_TOW = "update company set exhibition_period=:VEXHIBITION_PERIOD,logo_img=:VLOGO_IMG,cust_supply=:VXIAOSHOU_ALL_NEWS_ID,cust_buying=:VCAIGOU_ALL_NEWS_ID,oper_user=:VUSER_ID,oper_time=now(),juristic=:VJURISTIC,enterprise_type_code=:VENTERPRISE_TYPE_CODE,eparchy_code=:VEPARCHY_CODE,group_contact_phone=:VGROUP_CONTACT_PHONE,fax_nbr=:VFAX_NBR,website=:VWEBSITE,post_code=:VPOST_CODE,company_address=:VCOMPANY_ADDRESS,bank_deposit=:VBANK_DEPOSIT,bank_account=:VBANK_ACCOUNT,banking_account=:VBANKING_ACCOUNT,user_count=:VUSER_COUNT,certification=:VCERTIFICATION ,company_scope=:VCOMPANY_SCOPE,email=:VEMAIL where cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_ALL_FIELD_INFOAUTH_TOW = "update company set cust_name=:VCUST_NAME,abbreviated=:VABBREVIATED,pspt_id=:VPSPT_ID,type=:VTYPE,exhibition_period=:VEXHIBITION_PERIOD,logo_img=:VLOGO_IMG,cust_supply=:VXIAOSHOU_ALL_NEWS_ID,cust_buying=:VCAIGOU_ALL_NEWS_ID,oper_user=:VUSER_ID,oper_time=now(),juristic=:VJURISTIC,enterprise_type_code=:VENTERPRISE_TYPE_CODE,eparchy_code=:VEPARCHY_CODE,group_contact_phone=:VGROUP_CONTACT_PHONE,fax_nbr=:VFAX_NBR,website=:VWEBSITE,post_code=:VPOST_CODE,company_address=:VCOMPANY_ADDRESS,bank_deposit=:VBANK_DEPOSIT,bank_account=:VBANK_ACCOUNT,banking_account=:VBANKING_ACCOUNT,user_count=:VUSER_COUNT,certification=:VCERTIFICATION ,company_scope=:VCOMPANY_SCOPE,email=:VEMAIL,info_auth=1 where cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_FEIGUANJIAN_INFOAUTH_TOWW = "update company set logo_img=:VLOGO_IMG,cust_supply=:VXIAOSHOU_ALL_NEWS_ID,cust_buying=:VCAIGOU_ALL_NEWS_ID,oper_user=:VUSER_ID,oper_time=now(),juristic=:VJURISTIC,enterprise_type_code=:VENTERPRISE_TYPE_CODE,eparchy_code=:VEPARCHY_CODE,group_contact_phone=:VGROUP_CONTACT_PHONE,fax_nbr=:VFAX_NBR,website=:VWEBSITE,post_code=:VPOST_CODE,company_address=:VCOMPANY_ADDRESS,bank_deposit=:VBANK_DEPOSIT,bank_account=:VBANK_ACCOUNT,banking_account=:VBANKING_ACCOUNT,user_count=:VUSER_COUNT,certification=:VCERTIFICATION ,company_scope=:VCOMPANY_SCOPE,email=:VEMAIL where cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_ZERO_INFOAUTH = "UPDATE COMPANY SET info_auth='0',oper_user=:VOPER_USER,oper_time=now() WHERE cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_FOUR_INFOAUTH = "UPDATE COMPANY SET info_auth='4',oper_user=:VOPER_USER,oper_time=now() WHERE cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_INFO_BY_CUSTID_SHIBAI = "update company a set a.cust_state='2',a.auto_state=:VAUTO_STATE,a.dis_state=:VDIS_STATE,a.back_reason=:VBACK_REASON,a.check_time=now(),a.check_user=:VSESSION_USER_ID where a.cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_SAVE_SAUBMIT = "update company set info_auth=:VINFO_AUTH,logo_img=:VLOGO_IMG,cust_supply=:VCUST_SUPPLY,cust_buying=:VCUST_BUYING,oper_user=:VSESSION_USER_ID,oper_time=now(),juristic=:VJURISTIC,enterprise_type_code=:VENTERPRISE_TYPE_CODE,eparchy_code=:VEPARCHY_CODE,group_contact_phone=:VGROUP_CONTACT_PHONE,fax_nbr=:VFAX_NBR,website=:VWEBSITE,post_code=:VPOST_CODE,company_address=:VCOMPANY_ADDRESS,bank_deposit=:VBANK_DEPOSIT,bank_account=:VBANK_ACCOUNT,banking_account=:VBANKING_ACCOUNT,user_count=:VUSER_COUNT,certification=:VCERTIFICATION ,company_scope=:VCOMPANY_SCOPE,email=:VEMAIL where cust_id=:VSESSION_CUST_ID";
  public static String company_UPDATE_COMPANY_SAVE_SAUBMIT_BY_NOMOREL = "update company set info_auth='1',logo_img=:VLOGO_IMG,cust_supply=:VCUST_SUPPLY,cust_buying=:VCUST_BUYING,oper_user=:VSESSION_USER_ID,oper_time=now(),juristic=:VJURISTIC,enterprise_type_code=:VENTERPRISE_TYPE_CODE,eparchy_code=:VEPARCHY_CODE,group_contact_phone=:VGROUP_CONTACT_PHONE,fax_nbr=:VFAX_NBR,website=:VWEBSITE,post_code=:VPOST_CODE,company_address=:VCOMPANY_ADDRESS,bank_deposit=:VBANK_DEPOSIT,bank_account=:VBANK_ACCOUNT,banking_account=:VBANKING_ACCOUNT,user_count=:VUSER_COUNT,certification=:VCERTIFICATION ,company_scope=:VCOMPANY_SCOPE,email=:VEMAIL where cust_id=:VSESSION_CUST_ID";
  public static String company_UPDATE_COMPANY_AUTHSTATE = "update company a set a.cust_state='1',a.info_auth='1',a.auto_state=:VAUTO_STATE,a.dis_state=:VDIS_STATE,a.back_reason='',a.check_time=now(),a.check_user=:VSESSION_USER_ID where a.cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_TYPE = "update company set type=:VTYPE where cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_AUTHSTATE_AUTHDATE = "update company a set a.cust_state='1',a.info_auth='1',a.auto_state=:VAUTO_STATE,a.dis_state=:VDIS_STATE,a.back_reason='',a.check_time=now(),a.check_user=:VSESSION_USER_ID,a.auth_date=now() where a.cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_AUTHSTATE_TWO = "update company a set a.cust_state='1',a.info_auth='2',level_id=:VLEVEL_ID,a.auto_state=:VAUTO_STATE,a.dis_state=:VDIS_STATE,a.back_reason=:VBACK_REASON,a.check_time=now(),a.check_user=:VSESSION_USER_ID where a.cust_id=:VCUST_ID";
  public static String company_UPDATE_COMPANY_AUTHSTATE_TWO_CUSTSTATE_NO = "update company a set a.cust_state='2',a.info_auth='2',level_id=:VLEVEL_ID,a.auto_state=:VAUTO_STATE,a.dis_state=:VDIS_STATE,a.back_reason=:VBACK_REASON,a.check_time=now(),a.check_user=:VSESSION_USER_ID where a.cust_id=:VCUST_ID";
  public static String company_SEL_COM_INFOAUTH = "select info_auth from company where cust_id=:VCUST_ID";
  public static String company_auth_UPDATE_COMPANY_FEIGUANJIAN_INFOAUTH_TOW = "update company set logo_img=:VLOGO_IMG,cust_supply=:VXIAOSHOU_ALL_NEWS_ID,cust_buying=:VCAIGOU_ALL_NEWS_ID,oper_user=:VUSER_ID,oper_time=now(),juristic=:VJURISTIC,enterprise_type_code=:VENTERPRISE_TYPE_CODE,eparchy_code=:VEPARCHY_CODE,group_contact_phone=:VGROUP_CONTACT_PHONE,fax_nbr=:VFAX_NBR,website=:VWEBSITE,post_code=:VPOST_CODE,company_address=:VCOMPANY_ADDRESS,bank_deposit=:VBANK_DEPOSIT,bank_account=:VBANK_ACCOUNT,banking_account=:VBANKING_ACCOUNT,user_count=:VUSER_COUNT,certification=:VCERTIFICATION ,company_scope=:VCOMPANY_SCOPE,email=:VEMAIL,type=:VTYPE where cust_id=:VCUST_ID";
  public static String company_auth_SEL_INFO_TO_COMPANYAUTH = "select cust_id from company_auth where cust_id=:VCUST_ID";
  public static String company_auth_SEL_COMPANYAUTH_BY_CUSTID_INFOSEE = "select a.email, a.cust_name, a.dis_state, a.juristic, a.abbreviated, a.enterprise_type_code, a.eparchy_code, a.group_contact_phone, a.fax_nbr, a.company_address, a.post_code, a.pspt_id, a.website, a.bank_deposit, a.bank_account, a.banking_account, a.cust_rage, a.user_count, a.certification, a.company_scope, a.cust_supply, a.cust_buying, a.register_attach from company_auth a,company b where a.company_auth_id=:VCUST_ID and a.company_auth_id=b.company_auth_id";
  public static String company_auth_SEL_COMPANYAUTH_BY_CUSTID_INFOSEE_ALL = "select * from company_auth where cust_id=:VCUST_ID";
  public static String company_auth_SEL_IMG_BY_CUST_ID = "select register_attach from company_auth where cust_id = :VCUST_ID";
  public static String company_auth_DEL_COMPANYAUTH_IMG_BY_CUSTID = "update company_auth set register_attach = '' where cust_id = :VCUST_ID";
  public static String company_auth_INS_IMG_BY_CUSTID = "update company_auth set register_attach=:VREGISTER_ATTACH where cust_id=:VCUST_ID";
  public static String company_auth_INSERT_COMPANYAUTH_INFO_ALL = "INSERT INTO company_auth (logo_img,company_auth_id,cust_supply,cust_buying,register_attach,cust_id,oper_user,cust_name,juristic,abbreviated,enterprise_type_code,eparchy_code,group_contact_phone,fax_nbr,website,post_code,pspt_id,company_address,bank_deposit,bank_account,banking_account,user_count,certification,cust_rage,company_scope,email,oper_time,type,exhibition_period) values(:VLOGO_IMG,:VCOMPANY_AUTH_ID_INS,:VXIAOSHOU_ALL_NEWS_ID,:VCAIGOU_ALL_NEWS_ID,:VREGISTER_ATTACH,:VCUST_ID,:VUSER_ID,:VCUST_NAME,:VJURISTIC,:VABBREVIATED,:VENTERPRISE_TYPE_CODE,:VEPARCHY_CODE,:VGROUP_CONTACT_PHONE,:VFAX_NBR,:VWEBSITE,:VPOST_CODE,:VPSPT_ID,:VCOMPANY_ADDRESS,:VBANK_DEPOSIT,:VBANK_ACCOUNT,:VBANKING_ACCOUNT,:VUSER_COUNT,:VCERTIFICATION,:VCUST_RAGE,:VCOMPANY_SCOPE,:VEMAIL,now(),:VTYPE,:VEXHIBITION_PERIOD)";
  public static String company_auth_UPDATE_COMPANY_ALL_INFOAUTH_TOW = "update company set company_auth_id=:VCOMPANY_AUTH_ID,cust_id=:VCUST_ID,oper_user=:VUSER_ID,oper_time=now(),juristic=:VJURISTIC,abbreviated=:VABBREVIATED,enterprise_type_code=:VENTERPRISE_TYPE_CODE,eparchy_code=:VEPARCHY_CODE,group_contact_phone=:VGROUP_CONTACT_PHONE,fax_nbr=:VFAX_NBR,website=:VWEBSITE,post_code=:VPOST_CODE,company_address=:VCOMPANY_ADDRESS,bank_deposit=:VBANK_DEPOSIT,bank_account=:VBANK_ACCOUNT,banking_account=:VBANKING_ACCOUNT,user_count=:VUSER_COUNT,certification=:VCERTIFICATION ,company_scope=:VCOMPANY_SCOPE,email=:VEMAIL,type=:VTYPE,exhibition_period=:VEXHIBITION_PERIOD where cust_id=:VCUST_ID";
  public static String company_auth_UPDATE_COMPANYAUTH_FEIGUANJIAN_INFOAUTH_TOW = "INSERT INTO company_auth (pspt_id,cust_rage,cust_name,company_auth_id,cust_id,oper_user, oper_time, juristic, abbreviated, enterprise_type_code, eparchy_code, group_contact_phone, fax_nbr, website, post_code, company_address, bank_deposit, bank_account, banking_account, user_count, certification, company_scope, email) values (:VPSPT_ID,:VCUST_RAGE,:VCUST_NAME,:VCOMPANY_AUTH_ID,:VCUST_ID,:VUSER_ID,now(),:VJURISTIC,:VABBREVIATED,:VENTERPRISE_TYPE_CODE,:VEPARCHY_CODE,:VGROUP_CONTACT_PHONE,:VFAX_NBR,:VWEBSITE,:VPOST_CODE,:VCOMPANY_ADDRESS,:VBANK_DEPOSIT,:VBANK_ACCOUNT,:VBANKING_ACCOUNT,:VUSER_COUNT,:VCERTIFICATION,:VCOMPANY_SCOPE,:VEMAIL)";
  public static String company_SEL_COMPANYAUTHIUFO = "select cust_id,oper_time,group_contact_phone,email,cust_name,info_auth,cust_rage from company where info_auth in('0','3') order by cust_id desc";
  public static String company_auth_INSERT_COMPANYAUTH_ALL_INFOAUTH_TOW = "update company_auth set logo_img=:VLOGO_IMG,cust_supply=:VXIAOSHOU_ALL_NEWS_ID,cust_buying=:VCAIGOU_ALL_NEWS_ID,register_attach=:VREGISTER_ATTACH,cust_id=:VCUST_ID,oper_user=:VUSER_ID,oper_time=now(),cust_name=:VCUST_NAME,juristic=:VJURISTIC,abbreviated=:VABBREVIATED,enterprise_type_code=:VENTERPRISE_TYPE_CODE,eparchy_code=:VEPARCHY_CODE,group_contact_phone=:VGROUP_CONTACT_PHONE,fax_nbr=:VFAX_NBR,website=:VWEBSITE,post_code=:VPOST_CODE,pspt_id=:VPSPT_ID,company_address=:VCOMPANY_ADDRESS,bank_deposit=:VBANK_DEPOSIT,bank_account=:VBANK_ACCOUNT,banking_account=:VBANKING_ACCOUNT,user_count=:VUSER_COUNT,certification=:VCERTIFICATION,cust_rage=:VCUST_RAGE,company_scope=:VCOMPANY_SCOPE,email=:VEMAIL,type=:VTYPE,exhibition_period=:VEXHIBITION_PERIOD where cust_id=:VCUST_ID";
  public static String company_auth_SEL_COMPANYAUTH_BY_CUST_ID_INFOSEE = "select * from company_auth a where a.cust_id=:VCUST_ID";
  public static String company_SEL_COMPANYAUTH_BY_CUST_ID_INFOSEE = "select * from compan a where a.cust_id=:VCUST_ID";
  public static String company_auth_SEL_COMPANYAUTH_BY_CUST_ID_ALL = "select cust_supply,cust_buying,register_attach,cust_name,juristic,abbreviated,enterprise_type_code,eparchy_code,group_contact_phone,fax_nbr,website,post_code,pspt_id,company_address,bank_deposit,bank_account,banking_account,user_count,certification,cust_rage,company_scope,email,logo_img from company_auth where cust_id=:VCUST_ID";
  public static String company_auth_UPDATE_COMPANYAUTH_ALL_INFOAUTH_SAVE = "update company_auth set logo_img=:VLOGO_IMG,cust_supply=:VXIAOSHOU_ALL_NEWS_ID,cust_buying=:VCAIGOU_ALL_NEWS_ID,register_attach=:VREGISTER_ATTACH,cust_id=:VCUST_ID,oper_user=:VUSER_ID,oper_time=now(),cust_name=:VCUST_NAME,juristic=:VJURISTIC,abbreviated=:VABBREVIATED,enterprise_type_code=:VENTERPRISE_TYPE_CODE,eparchy_code=:VEPARCHY_CODE,group_contact_phone=:VGROUP_CONTACT_PHONE,fax_nbr=:VFAX_NBR,website=:VWEBSITE,post_code=:VPOST_CODE,pspt_id=:VPSPT_ID,company_address=:VCOMPANY_ADDRESS,bank_deposit=:VBANK_DEPOSIT,bank_account=:VBANK_ACCOUNT,banking_account=:VBANKING_ACCOUNT,user_count=:VUSER_COUNT,certification=:VCERTIFICATION,cust_rage=:VCUST_RAGE,company_scope=:VCOMPANY_SCOPE,email=:VEMAIL,type=:VTYPE,exhibition_period=:VEXHIBITION_PERIOD where cust_id=:VCUST_ID";
  public static String company_SEL_COMPANY_BY_SHENHE = "select * from company where cust_id=:VCUST_ID";
  public static String user_info_SEL_USERIUFO_BY_USERID_INFOSEE = "select phone,user_state, contact_name, passwd ,user_name, cellphone, email,qq,msn,personal_id id_card,work_depart from user_info where user_id=:VUSER_ID";
  public static String user_info_SHENGQINGZHUXIAO_USERINFO = "update user_info set user_state='5',oper_user=:VUSER_ID,oper_time=now() where user_id=:VUSER_ID";
  public static String user_info_EDIT_USERIDFO = "update user_info set phone=:VPHONE,email=:VEMAIL,cellphone=:VCELLPHONE,qq=:VQQ,msn=:VMSN,personal_id = :VRSRV_STR3 where user_id=:VUSER_ID";
  public static String user_info_EDIT_USERIDFO_I = "update user_info set phone=:VPHONE,email=:VEMAIL,cellphone=:VCELLPHONE,qq=:VQQ,msn=:VMSN where user_id=:VUSER_ID";
  public static String user_info_EDIT_USERIDFO1 = "update user_info set phone=:VPHONE,email=:VEMAIL,cellphone=:VCELLPHONE,qq=:VQQ,msn=:VMSN,work_depart=:VWORK_DEPART where user_id=:VUSER_ID";
  public static String user_info_EDIT_USERIDFO2 = "update user_info set phone=:VPHONE,email=:VEMAIL,cellphone=:VCELLPHONE,qq=:VQQ,msn=:VMSN,work_depart=:VWORK_DEPART,personal_id = :VRSRV_STR3 where user_id=:VUSER_ID";
  public static String user_info_SEL_USERIUFO_BY_USERID = "select user_name,contact_name,user_id from user_info where cust_id=:VCUST_ID";
  public static String user_info_UPDATE_USER_QUXIAOZHUXIAO = "update user_info set user_state='1',check_time=now(),check_user=:VSESSION_USER_ID where user_id=:VUSER_ID";
  public static String user_info_UPDATE_USER_ZHUXIAO = "update user_info set user_state='3',check_time=now(),check_user=:VSESSION_USER_ID where user_id=:VUSER_ID";
  public static String user_info_UPDATE_USER_JIESUO = "update user_info set user_state='1',check_time=now(),check_user=:VSESSION_USER_ID where user_id=:VUSER_ID";
  public static String user_info_UPDATE_USER_SUODING = "update user_info set user_state='4',check_time=now(),check_user=:VSESSION_USER_ID where user_id=:VUSER_ID";
  public static String user_info_GET_ALL_USER_INFO = "select c.cust_id,u.user_id from user_info u,company c where u.cust_id = c.cust_id and c.cust_type != 0";
  public static String area_info_SEL_AREANAME_BY_ID = "select area_id, area_name, area_code from area_info where area_id=:VAREA_ID";
  public static String area_info_SEL_AREANAME_COUNTRY = "select area_id, area_name, area_code from area_info where LENGTH(area_id)='3'";
  public static String user_SEL_USER_BY_CUSTID_SHENHE = "select user_id,cust_name, contact_name, email, fax, user_type, user_name, sex, phone, qq from user_info where cust_id = :VCUST_ID";
  public static String score_model_SEL_SCOREMODEL_MAXID = "select MAX(score_model_id) as maxid from score_model";
  public static String score_model_INSELT_ONE_SCOREMODEL = "insert into score_model(score_model_id,score_model_name,score_model_comment,oper_time,remove_tag,oper_user,add_date)VALUES(:VSCORE_MODEL_ID,:VSCORE_MODEL_NAME,:VSCORE_MODEL_COMMENT,now(),:VREMOVE_TAG,:VOPER_USER,now())";
  public static String score_model_SEL_SCORE_MODEL_LIST = "select score_model_id,score_model_name,score_model_comment,remove_tag,oper_time from score_model order by score_model_id";
  public static String score_model_SEL_ONE_SCORE_MODEL = "select score_model_name,score_model_comment,remove_tag,oper_time from score_model where score_model_id=:VSCORE_MODEL_ID";
  public static String score_model_UPDATE_ONE_SCOREMODEL = "update score_model set score_model_id= :VSCORE_MODEL_ID,score_model_name=:VSCORE_MODEL_NAME,score_model_comment=:VSCORE_MODEL_COMMENT,oper_time= now(),remove_tag= :VREMOVE_TAG,oper_user= :VOPER_USER where score_model_id=:VSCORE_MODEL_ID";
  public static String score_parameter_UPDATE_SCOREMODEL_NAME = "update score_parameter set score_model_name = :VSCORE_MODEL_NAME,remove_tag=:VREMOVE_TAG where score_model_id = :VSCORE_MODEL_ID";
  public static String score_model_DELETE_SCORE_MODEL = "delete from score_model where score_model_id = :VSCORE_MODEL_ID";
  public static String score_parameter_DELETE_SCORE_PARAM = "delete from score_parameter where score_model_id = :VSCORE_MODEL_ID";
  public static String score_model_GET_ALL_SCORE_MODEL = "select score_model_id,score_model_name from score_model";
  public static String score_model_GET_MODEL_NAME_BY_ID = "select score_model_name from score_model where score_model_id = :VSCORE_MODEL_ID";
  public static String company_level_SEL_COMPANY_LEVEL_INFO_BY_LEVEL_ID = "select news_check,product_check,sales_check,buying_check from company_level where level_id=:VLEVEL_ID";
  public static String company_level_INS_COMPANY_LEVEL = "insert into company_level(level_id,level_name,level_comment,oper_time,oper_user,remove_tag,add_date,level_value,news_check,product_check,sales_check,buying_check,news_score,product_score,buying_score,sales_score,stock_score,level_logo,level_enterprise) values(:VLEVEL_ID,:VLEVEL_NAME,:VLEVEL_COMMENT,now(),:VOPER_USER,:VREMOVE_TAG,now(),:VLEVEL_VALUE,:VNEWS_CHECK,:VPRODUCT_CHECK,:VSALES_CHECK,:VBUYING_CHECK,:VNEWS_SCORE,:VPRODUCT_SCORE,:VBUYING_SCORE,:VSALES_SCORE,:VSTOCK_SCORE,:VLEVEL_LOGO,:VLEVEL_ENTERPRISE)";
  public static String company_level_SEL_ALL_COMPANY_LEVEL = "select level_id,level_name,level_comment,oper_time,oper_user,remove_tag,level_logo from company_level order by level_id desc";
  public static String company_level_SEL_COMPANY_LEVEL = "select level_id,level_name,level_comment,oper_time,oper_user,remove_tag,level_logo from company_level where level_name like :VLEVEL_NAME order by level_id desc";
  public static String company_level_SEL_COMPANY_LEVEL_TAG = "select level_id,level_name,level_comment,oper_time,oper_user,remove_tag,level_logo from company_level where level_name like ? and remove_tag= ? order by level_id desc";
  public static String site_parameter_SEL_DEFAULT_LEVEL_BY_PARAM_VALUE = "select param_id from site_parameter where param_value=:VPARAM_VALUE";
  public static String company_SEL_CUST_BY_LEVEL = "select cust_id from company where level_id=:VLEVEL_ID";
  public static String product_DEL_PRODUCT_BY_CUST = "delete from product where cust_id=:VCUST_ID";
  public static String buying_DEL_BUY_BY_CUST = "delete from buying where cust_id=:VCUST_ID";
  public static String sales_DEL_SALE_BY_CUST = "delete from sales where cust_id=:VCUST_ID";
  public static String score_list_DEL_SCORE_BY_LEVEL = "delete from score_list where level_id=:VLEVEL_ID";
  public static String company_level_SEL_ALL_COMPANY_LEVEL_TAG = "select level_id,level_name,level_comment,oper_time,oper_user,remove_tag from company_level where remove_tag = '1'";
  public static String company_level_SEL_ONE_COMPANY_LEVEL = "select * from company_level where level_id=:VLEVEL_ID";
  public static String company_level_UPDATE_COMPANY_LEVEL = "update company_level set level_comment = :VLEVEL_COMMENT,oper_time = now(),oper_user = :VOPER_USER,remove_tag=:VREMOVE_TAG,level_value=:VLEVEL_VALUE,news_check=:VNEWS_CHECK,product_check=:VPRODUCT_CHECK,sales_check=:VSALES_CHECK,buying_check=:VBUYING_CHECK,news_score=:VNEWS_SCORE,product_score=:VPRODUCT_SCORE,sales_score=:VSALES_SCORE,buying_score=:VBUYING_SCORE,stock_score=:VSTOCK_SCORE,level_logo=:VLEVEL_LOGO,level_enterprise=:VLEVEL_ENTERPRISE where level_id = :VLEVEL_ID";
  public static String company_level_UPDATE_COMPANY_LEVEL_FOR_CUST_ID = "update company set level_id = :VLEVEL_ID where cust_id = :VCUST_ID";
  public static String company_level_DEL_COMPANY_LEVEL = "delete from company_level where level_id=:VLEVEL_ID";
  public static String company_SEL_COMPANY_BY_LEVEL_ID = "select cust_id,cust_name from company where level_id=:VLEVEL_ID";
  public static String company_level_SEL_LEVEL_NAME_CHECKED = "select level_id from company_level where level_name=:VLEVEL_NAME";
  public static String company_level_SEL_LEVELID_LEVELNAME_FROM_COMPANYLEVEL = "select level_id, level_name from company_level where remove_tag='1'";
  public static String company_level_SEL_LEVELID_LEVELNAME_FROM_COMPANYLEVEL_BY_LEVELID = "select level_name from company_level where level_id=:VLEVEL_ID ";
  public static String company_UP_COMPANYLEVEL = "update company set level_logo=:VLEVEL_LOGO where level_id=:VLEVEL_ID";
  public static String company_level_SEL_COMPANYLEVEL_TAG = "select level_id,level_name,level_logo from company_level where remove_tag = '1'";
  public static String company_SEL_COMPANYLIST = "SELECT cust_id, cust_name, cust_type,level_id,level_name FROM COMPANY WHERE (cust_state=1 or cust_state=0) and cust_type <> 0 order by cust_id desc";
  public static String company_UP_COMPANYLEVEL_BATCH = "update company set level_id=:VLEVEL_ID,level_name=:VLEVEL_NAME,level_logo=:VLEVEL_LOGO WHERE cust_state=1 and cust_type <> 0";
  public static String company_UP_COMPANYLEVEL_BATCH_BYID = "update company set level_id=:VLEVEL_ID,level_name=:VLEVEL_NAME,level_logo=:VLEVEL_LOGO WHERE cust_id=:VCUST_ID";
  public static String company_auth_UP_COMPANYAUTH_BATCH_BYID = "update company_auth set level_id=:VLEVEL_ID,level_name=:VLEVEL_NAME,level_logo=:VLEVEL_LOGO WHERE cust_id=:VCUST_ID";
  public static String company_level_SEL_COMPANY_LEVEL_CHOOSE = "select level_id,level_name,level_logo from company_level where remove_tag='1' order by level_id desc";
  public static String company_level_SEL_COMPANY_LEVEL_CHOOSE_LEVELID = "select level_id,level_name,level_logo from company_level where level_id=:VLEVEL_ID";
  public static String user_info_SEL_COMPANYLIST_INFO_LIST = "select b.cust_id,b.user_id,b.cust_name,b.user_name from (select distinct count(c.cust_id), c.cust_id,u.user_id,c.cust_name,u.user_name from company c inner join user_info u on c.cust_id = u.cust_id where u.user_id <> :VUSER_ID and c.cust_state=1  group by c.cust_id) b ";
  public static String user_info_SEL_COMPANYLIST_INFO_LIST2 = "select t1.cust_id,t1.user_id,t2.cust_name,t1.user_name from user_info t1,company t2 where t1.cust_id=t2.cust_id and t2.cust_name like :VCUST_NAME and t1.user_id != :VUSER_ID and t2.cust_state =1 group by t1.cust_id";
  public static String company_SEL_COMPANYLIST_INFO_LIST_KEY = "select b.cust_id,b.user_id,b.cust_name,b.user_name from (select distinct count(c.cust_id), c.cust_id,u.user_id,c.cust_name,u.user_name from company c inner join user_info u on c.cust_id = u.cust_id where u.user_id <> :VUSER_ID and c.cust_name like :VCUST_NAME and u.user_name like :VUSER_NAME and c.cust_state=1  group by c.cust_id) b ";
  public static String user_info_UPDATE_USERSTATE_BY_USERID = "update user_info set user_state =:VUSER_STATE where user_id =:VUSER_ID";
  public static String user_info_SEL_SIMPLEINFO_BY_USERID = "select u.user_id,u.user_name,u.image,u.user_type from user_info u where u.user_id = :VUSER_ID";
  public static String user_info_SEL_USER_BY_USER_TYPE = "select u.user_id,u.user_state,u.user_name,u.cust_name,u.reg_date,u.phone,u.qq,u.home_addr,c.cust_id from user_info u, company c where u.cust_id = c.cust_id and c.cust_type = 1";
  public static String user_info_SEL_USER_BY_USER_TYPE_UT = "select u.user_id,u.user_state,u.user_name,u.cust_name,u.reg_date,u.phone,u.qq,u.home_addr,c.cust_id from user_info u, company c where u.cust_id = c.cust_id and (c.cust_type=:VCUST_TYPE or c.cust_type='2') and u.user_state=:VUSER_STATE order by u.add_date";
  public static String user_info_SEL_USER_BY_USER_TYPE_UT_KEYWORD = "select u.user_id,u.user_state,u.user_name,u.cust_name,u.reg_date,u.phone,u.qq,u.home_addr,c.cust_id from user_info u, company c where u.cust_id = c.cust_id and (c.cust_type=:VCUST_TYPE or c.cust_type='2') and u.user_name like :VKEY_WORD and u.user_state=:VUSER_STATE order by u.add_date";
  public static String user_info_UPDATE_USER_STATE = "update user_info set user_state=:VUSER_STATE,user_state_date=:VUSER_STATE_DATE,role_auth_id=:VROLE_AUTH_ID where user_id=:VUSER_ID";
  public static String user_info_CHECK_USER_STATE = "update user_info set user_state=:VUSER_STATE,check_time=:VCHECK_TIME,check_user=:VCHECK_USER,back_reason=:VBACK_REASON,role_auth_id=:VROLE_AUTH_ID where user_id=:VUSER_ID";
  public static String user_info_SEL_USER_BY_USER_ID = "select u.user_name,u.user_type,u.cust_name,u.reg_date,u.nickname,u.sex,u.cellphone,u.fax,u.qq,u.email,u.contact_name from user_info u where user_id=:VUSER_ID";
  public static String user_info_SEL_USER_UPDATE_ONE = "select user_name,eparchy_code,city_code,nickname,pspt_type_code,pspt_id,pspt_end_date,pspt_addr,sex,birthday,local_native_code,population,folk_code,phone,cellphone,post_code,post_addr,fax,qq,blog,email,contact_name,home_addr,work_name,work_depart,job,job_type_code,educate_degree_code,marriage,community_id,department_code,remark from user_info where user_id=:VUSER_ID";
  public static String user_info_CHANGE_USER_PASSWORD = "update user_info set passwd=:VPASSWD where user_id=:VUSER_ID";
  public static String td_s_commpara_SEL_TDCOMMPARA_BY_PARAM_CODE = "select para_code1,para_code2 from td_s_commpara where param_code=:VPARAM_CODE and subsys_code=:VSUBSYS_CODE";
  public static String user_info_UPDATE_USER_UPDATE_ONE = "update user_info set eparchy_code=:VEPARCHY_CODE,city_code=:VCITY_CODE,pspt_type_code=:VPSPT_TYPE_CODE,pspt_id=:VPSPT_ID,pspt_end_date=:VPSPT_END_DATE,pspt_addr=:VPSPT_ADDR,sex=:VSEX,birthday=:VBIRTHDAY,local_native_code=:VLOCAL_NATIVE_CODE,folk_code=:VFOLK_CODE,phone=:VPHONE,cellphone=:VCELLPHONE,post_code=:VPOST_CODE,post_addr=:VPOST_ADDR,fax=:VFAX,qq=:VQQ,blog=:VBLOG,email=:VEMAIL,home_addr=:VHOME_ADDR,work_name=:VWORK_NAME,work_depart=:VWORK_DEPART,job=:VJOB,job_type_code=:VJOB_TYPE_CODE,marriage=:VMARRIAGE,community_id=:VCOMMUNITY_ID,nickname=:VNICKNAME where user_id=:VUSER_ID";
  public static String user_info_APPLY_USER_LOGOUT = "update user_info set user_state=:VUSER_STATE,remark=:VREMARK where user_id=:VUSER_ID";
  public static String user_info_GET_USER_STATE_FROM_USER = "select user_state from user_info where user_id=:VUSER_ID";
  public static String user_info_SEL_USER_BY_TITLE = "select u.user_id,u.user_state,u.user_name,u.cust_name,u.reg_date,u.phone,u.qq,u.home_addr,c.cust_id from user_info u, company c where u.cust_id = c.cust_id  and u.user_name like :VKEY_WORD";
  public static String user_info_SEL_USER_BY_USERANDCUST = "select u.user_id,u.user_state,u.user_name,u.cust_name,u.reg_date,u.phone,u.qq,u.home_addr,c.cust_id from user_info u, company c where u.cust_id = c.cust_id  and u.user_name like :VKEY_WORD and u.cust_name like :VCUST_NAME and c.cust_type = 1";
  public static String user_info_SEL_USER_BY_ADMIN = "select user_name,cust_name,contact_name from user_info where user_id=:VUSER_ID";
  public static String user_info_ADD_USER_ADMIN = "insert into user_info(user_id,user_name,cust_id,passwd,user_state,user_type,phone,cellphone,contact_name,add_date,eparchy_code,reg_date,oper_user,oper_time) values(:VUSER_ID,:VUSER_NAME,:VCUST_ID,:VPASSWD,:VUSER_STATE,:VUSER_TYPE,:VPHONE,:VCELLPHONE,:VCONTACT_NAME,:VADD_DATE,:VEPARCHY_CODE,:VREG_DATE,:VOPER_USER,:VOPER_TIME)";
  public static String user_info_SEL_MAX_USER_ID = "select max(user_id) maxid from user_info";
  public static String user_info_SEL_USER_NAME_EXIST = "select user_id from user_info where user_name =:VUSER_NAME";
  public static String COMPLAINTS_SEL_COMPLAINTS_LIST_BY_TITLE = "SELECT trade_id, complaints_type, cust_id, phone, email, title, read_state, in_date FROM complaints WHERE user_id=:VUSER_ID and title like :VTITLE and complaints_type=:VCOMPLAINTS_TYPE ORDER BY in_date DESC";
  public static String COMPLAINTS_SEL_BY_INDATE = "SELECT trade_id, complaints_type, cust_id, phone, email, title, read_state, in_date FROM complaints WHERE user_id=:VUSER_ID and title like :VTITLE and complaints_type=:VCOMPLAINTS_TYPE and SUBSTRING(in_date,1,10)>=:VIN_DATE ORDER BY in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_LIST_BY_DATE = "SELECT trade_id, complaints_type, cust_id, phone, email, title, read_state, in_date FROM complaints WHERE user_id=:VUSER_ID and title like :VTITLE and complaints_type=:VCOMPLAINTS_TYPE and SUBSTRING(in_date,1,10) between :VIN_DATE and :VEND_DATE ORDER BY in_date DESC";
  public static String COMPLAINTS_SEL_BY_ENDDATE = "SELECT trade_id, complaints_type, cust_id, phone, email, title, read_state, in_date FROM complaints WHERE user_id=:VUSER_ID and title like :VTITLE and complaints_type=:VCOMPLAINTS_TYPE and SUBSTRING(in_date,1,10)<=:VEND_DATE ORDER BY in_date DESC";
  public static String COMPLAINTS_INSELT_ONE_COMPLAINTSINFO = "INSERT INTO COMPLAINTS (trade_id, complaints_type, cust_id, user_id, phone, email, for_cust_id, title, description, read_state, in_date) values(:VTRADE_ID, :VCOMPLAINTS_TYPE, :VCUST_ID, :VUSER_ID, :VPHONE, :VEMAIL, :VFOR_CUST_ID, :VTITLE, :VDESCRIPTION, :VREAD_STATE, now())";
  public static String company_SEL_COMPANYlIST_CHOOSE = "SELECT cust_id, account_id, cust_name, email, website, cust_type FROM COMPANY WHERE (cust_state=1 OR cust_state=2 OR cust_state=0 or cust_state=5) and cust_type <> 0";
  public static String company_SEL_COMPLAINTSCOMPANY_BYKEY = "SELECT cust_id, cust_name, cust_type,level_id,level_name,email FROM COMPANY WHERE (cust_state=1 OR cust_state=2 OR cust_state=0 or cust_state=5) and cust_type <> 0 and cust_name like :VKEYWORD";
  public static String COMPLAINTS_SEL_COMPLAINTS_LIST = "SELECT trade_id, complaints_type, cust_id, phone, email, title, read_state, in_date FROM complaints WHERE user_id=:VUSER_ID ORDER BY in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_CONTENT = "SELECT complaints_type, cust_id, user_id, phone, email, for_cust_id, title, description, read_state, reply_id, re_desc, reply_time FROM complaints WHERE trade_id=:VTRADE_ID";
  public static String company_SEL_COMPLAINTSCOMPANY_BYID = "SELECT cust_name FROM company WHERE cust_id=:VCUST_ID";
  public static String COMPLAINTS_INSELT_ONE_COMPLAINTS_HUIFU = "UPDATE COMPLAINTS SET reply_id=:VREPLY_ID, re_desc=:VRE_DESC, read_state=:VREAD_STATE, reply_time=now() WHERE trade_id=:VTRADE_ID";
  public static String COMPLAINTS_SEL_COMPLAINTSLIST_ALL = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id ORDER BY in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TITLE = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.title LIKE :VTITLE AND substring(a.in_date,1,10)>=:VSTART_DATE AND substring(a.in_date,1,10)<=:VEND_DATE ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TITLE_READ = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.title LIKE :VTITLE AND a.read_state=0 AND substring(a.in_date,1,10)>=:VSTART_DATE AND substring(a.in_date,1,10)<=:VEND_DATE ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TYPE = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.complaints_type=:VCOMPLAINTS_TYPE AND substring(a.in_date,1,10)>=:VSTART_DATE AND substring(a.in_date,1,10)<=:VEND_DATE ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TYPE_ONLY = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.complaints_type=:VCOMPLAINTS_TYPE ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TYPE_READ = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.complaints_type=:VCOMPLAINTS_TYPE AND a.read_state=0 AND substring(a.in_date,1,10)>=:VSTART_DATE AND substring(a.in_date,1,10)<=:VEND_DATE ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_STARTDATE = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  substring(a.in_date,1,10)>=:VSTART_DATE ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_STARTDATE_READ = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  substring(a.in_date,1,10)>=:VSTART_DATE AND a.read_state=0 ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_ENDDATE = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  substring(a.in_date,1,10)<=:VEND_DATE ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_ENDDATE_READ = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  substring(a.in_date,1,10)<=:VEND_DATE AND a.read_state=0 ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_NOTBACK = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND a.read_state=0  AND substring(a.in_date,1,10)>=:VSTART_DATE AND substring(a.in_date,1,10)<=:VEND_DATE ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TITLEANDTYPE = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.title LIKE :VTITLE AND a.complaints_type=:VCOMPLAINTS_TYPE AND substring(a.in_date,1,10)>=:VSTART_DATE AND substring(a.in_date,1,10)<=:VEND_DATE ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TITLEANDTYPE_READ = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.title LIKE :VTITLE AND a.complaints_type=:VCOMPLAINTS_TYPE AND a.read_state=0 AND substring(a.in_date,1,10)>=:VSTART_DATE AND substring(a.in_date,1,10)<=:VEND_DATE ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_STARTANDEND = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  substring(a.in_date,1,10)>=:VSTART_DATE AND substring(a.in_date,1,10)<=:VEND_DATE ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_STARTANDEND_READ = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  substring(a.in_date,1,10)>=:VSTART_DATE AND substring(a.in_date,1,10)<=:VEND_DATE AND a.read_state=0 ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TITLEANDSTART = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.title LIKE :VTITLE AND (substring(a.in_date,1,10)>=:VSTART_DATE) ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TITLEANDSTART_READ = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.title LIKE :VTITLE AND (substring(a.in_date,1,10)>=:VSTART_DATE) AND a.read_state=0 ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TITLEANDEND = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.title LIKE :VTITLE AND (substring(a.in_date,1,10)<=:VEND_DATE) ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TITLEANDEND_READ = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.title LIKE :VTITLE AND (substring(a.in_date,1,10)<=:VEND_DATE) AND a.read_state=0 ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TYPEANDSTART = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.complaints_type=:VCOMPLAINTS_TYPE AND (substring(a.in_date,1,10)>=:VSTART_DATE) ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TYPEANDSTART_READ = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.complaints_type=:VCOMPLAINTS_TYPE AND (substring(a.in_date,1,10)>=:VSTART_DATE) AND a.read_state=0 ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TYPEANDEND = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.complaints_type=:VCOMPLAINTS_TYPE AND (substring(a.in_date,1,10)<=:VEND_DATE) ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TYPEANDEND_READ = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.complaints_type=:VCOMPLAINTS_TYPE AND (substring(a.in_date,1,10)<=:VEND_DATE) AND a.read_state=0 ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TITLEAND = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  title LIKE :VTITLE AND (substring(a.in_date,1,10)>=:VSTART_DATE AND substring(a.in_date,1,10)<=:VEND_DATE) ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TITLEAND_READ = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.title LIKE :VTITLE AND (substring(a.in_date,1,10)>=:VSTART_DATE) AND substring(a.in_date,1,10)<=:VEND_DATE AND a.read_state=0 ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TYPEAND = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.complaints_type =:VCOMPLAINTS_TYPE AND (substring(a.in_date,1,10)>=:VSTART_DATE AND substring(a.in_date,1,10)<=:VEND_DATE) AND a.read_state=0 ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TYPEAND_READ = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.complaints_type =:VCOMPLAINTS_TYPE AND (substring(a.in_date,1,10)>=:VSTART_DATE AND substring(a.in_date,1,10)<=:VEND_DATE) ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TITLETYPEAND = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.title LIKE :VTITLE AND a.complaints_type=:VCOMPLAINTS_TYPE AND (substring(a.in_date,1,10)>=:VSTART_DATE) ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TITLETYPEAND_READ = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.title LIKE :VTITLE AND a.complaints_type=:VCOMPLAINTS_TYPE AND (substring(a.in_date,1,10)>=:VSTART_DATE) AND a.read_state=0 ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TITLETYPEANDEND = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.title LIKE :VTITLE AND a.complaints_type=:VCOMPLAINTS_TYPE AND (substring(a.in_date,1,10)<=:VEND_DATE) ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_TITLETYPEANDEND_READ = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.title LIKE :VTITLE AND a.complaints_type=:VCOMPLAINTS_TYPE AND (substring(a.in_date,1,10)<=:VEND_DATE) AND a.read_state=0 ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_CONDITIONS = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.title LIKE :VTITLE AND a.complaints_type=:VCOMPLAINTS_TYPE AND (substring(a.in_date,1,10)>=:VSTART_DATE AND substring(a.in_date,1,10)<=:VEND_DATE) ORDER BY a.in_date DESC";
  public static String COMPLAINTS_SEL_COMPLAINTS_BY_CONDITIONS_READ = "SELECT a.trade_id, a.complaints_type, a.cust_id, a.phone, a.email, a.for_cust_id, a.title, a.read_state, a.in_date, u.contact_name, c.cust_name FROM complaints a, user_info u,company c WHERE a.user_id=u.user_id AND a.for_cust_id=c.cust_id AND  a.title LIKE :VTITLE AND a.complaints_type=:VCOMPLAINTS_TYPE AND (substring(a.in_date,1,10)>=:VSTART_DATE AND substring(a.in_date,1,10)<=:VEND_DATE) AND a.read_state='0' ORDER BY a.in_date DESC";
  public static String user_info_SEL_CONTACTNAME_BYCUSTID = "SELECT contact_name FROM user_info WHERE cust_id=:VCUST_ID";
  public static String advertisement_INSELT_ONE_ADVERTISEMENTINFO = "INSERT INTO advertisement(trade_id, adv_title, adv_type, adv_content, adv_url, state_date, end_date, oper_user, oper_time, publish_user_id, publish_date, add_date, adv_publisher, adv_contact, adv_id, adv_site) values(:VTRADE_ID, :VADV_TITLE, :VADV_TYPE, :VADV_CONTENT, :VADV_URL, :VSTATE_DATE, :VEND_DATE, :VOPER_USER, now(), :VPUBLISH_USER_ID, now(), now(), :VADV_PUBLISHER, :VADV_CONTACT, :VADV_ID, :VADV_SITE)";
  public static String advertisement_SEL_ADVERTISEMENT_ALL = "SELECT trade_id, adv_title, adv_type, adv_nu, adv_url, state_date, end_date, click, view_count, oper_user, oper_time, publish_user_id, publish_date, add_date, adv_publisher, adv_id, adv_contact, adv_state, adv_site, actual_end_date FROM advertisement ORDER BY add_date DESC";
  public static String advertisement_SEL_ADVERTISEMENT_BY_STATE = "SELECT trade_id, adv_title, adv_type, adv_nu, adv_url, state_date, end_date, view_count, oper_user, oper_time, publish_user_id, publish_date, add_date, adv_publisher, adv_contact, adv_state, adv_id, adv_site,actual_end_date FROM advertisement WHERE adv_id like :VADV_ID AND adv_state = :VADV_STATE ORDER BY add_date DESC";
  public static String advertisement_SEL_ADVERTISEMENT_BY_TITLE = "SELECT trade_id, adv_title, adv_type, adv_nu, adv_url, state_date, end_date, view_count, oper_user, oper_time, publish_user_id, publish_date, add_date, adv_publisher, adv_contact, adv_state, adv_id, adv_site,actual_end_date FROM advertisement WHERE adv_id like :VADV_ID AND adv_title LIKE :VADV_TITLE ORDER BY add_date DESC";
  public static String advertisement_SEL_ADVERTISEMENT_BY_PUBLISHER = "SELECT trade_id, adv_title, adv_type, adv_nu, adv_url, state_date, end_date, view_count, oper_user, oper_time, publish_user_id, publish_date, add_date, adv_publisher, adv_contact, adv_state, adv_id, adv_site,actual_end_date FROM advertisement WHERE adv_id like :VADV_ID AND adv_publisher LIKE :VADV_PUBLISHER ORDER BY add_date DESC";
  public static String advertisement_SEL_ADVERTISEMENT_BY_STATEANDTITLE = "SELECT trade_id, adv_title, adv_type, adv_nu, adv_url, state_date, end_date, view_count, oper_user, oper_time, publish_user_id, publish_date, add_date, adv_publisher, adv_contact, adv_state, adv_id, adv_site,actual_end_date FROM advertisement WHERE adv_id like :VADV_ID AND adv_state = :VADV_STATE AND adv_title LIKE :VADV_TITLE ORDER BY add_date DESC";
  public static String advertisement_SEL_ADVERTISEMENT_BY_STATEANDPUBLISHER = "SELECT trade_id, adv_title, adv_type, adv_nu, adv_url, state_date, end_date, view_count, oper_user, oper_time, publish_user_id, publish_date, add_date, adv_publisher, adv_contact, adv_state, adv_id, adv_site,actual_end_date FROM advertisement WHERE adv_id like :VADV_ID AND adv_state = :VADV_STATE AND adv_publisher LIKE :VADV_PUBLISHER ORDER BY add_date DESC";
  public static String advertisement_SEL_ADVERTISEMENT_BY_TITLEANDPUBLISHER = "SELECT trade_id, adv_title, adv_type, adv_nu, adv_url, state_date, end_date, view_count, oper_user, oper_time, publish_user_id, publish_date, add_date, adv_publisher, adv_contact, adv_state, adv_id, adv_site,actual_end_date FROM advertisement WHERE adv_id like :VADV_ID AND adv_title LIKE :VADV_TITLE AND adv_publisher LIKE :VADV_PUBLISHER ORDER BY add_date DESC";
  public static String advertisement_SEL_ADVERTISEMENT_BY_TITLEANDSTATEANDPUBLISHER = "SELECT trade_id, adv_title, adv_type, adv_nu, adv_url, state_date, end_date,  view_count, oper_user, oper_time, publish_user_id, publish_date, add_date, adv_publisher, adv_contact, adv_state, adv_id, adv_site,actual_end_date FROM advertisement WHERE adv_id like :VADV_ID AND adv_state = :VADV_STATE AND adv_title LIKE :VADV_TITLE AND adv_publisher LIKE :VADV_PUBLISHER ORDER BY add_date DESC";
  public static String advertisement_SEL_ADCONTENT_BY_ID = "SELECT trade_id, adv_title, adv_type, adv_nu, adv_url, state_date, end_date, view_count, oper_user, oper_time, publish_user_id, publish_date, add_date, adv_publisher, adv_contact, adv_state, adv_content, adv_id, adv_site,actual_end_date FROM advertisement WHERE trade_id=:VTRADE_ID";
  public static String advertisement_REVOCATION_ADVERTISEMENT = "UPDATE advertisement SET adv_state=3, oper_time=now(), actual_end_date=now() where trade_id=:VTRADE_ID";
  public static String advertisement_EDIT_ADVERTISEMENT_INFO_UPDATE = "UPDATE advertisement SET adv_title=:VADV_TITLE, adv_url=:VADV_URL, adv_publisher=:VADV_PUBLISHER, adv_contact=:VADV_CONTACT, state_date=:VSTATE_DATE, end_date=:VEND_DATE, oper_user=:VOPER_USER, oper_time=now(), adv_content=:VADV_CONTENT,adv_state=1,actual_end_date=null WHERE trade_id=:VTRADE_ID";
  public static String advertisement_EDIT_ADVERTISEMENT_INFO = "UPDATE advertisement SET adv_title=:VADV_TITLE, adv_url=:VADV_URL, adv_publisher=:VADV_PUBLISHER, adv_contact=:VADV_CONTACT, state_date=:VSTATE_DATE, end_date=:VEND_DATE, oper_user=:VOPER_USER, oper_time=now(), adv_content=:VADV_CONTENT WHERE trade_id=:VTRADE_ID";
  public static String advertisement_EDIT_ADVERTISEMENTNUM_INFO = "UPDATE advertisement SET adv_title=:VADV_TITLE, adv_url=:VADV_URL, adv_publisher=:VADV_PUBLISHER, adv_contact=:VADV_CONTACT, state_date=:VSTATE_DATE, end_date=:VEND_DATE, oper_user=:VOPER_USER, oper_time=now(), adv_content=:VADV_CONTENT WHERE trade_id=:VTRADE_ID";
  public static String advertisement_SEL_ADVERTISEMENT_BY_ADV_ID = "SELECT trade_id, adv_title, adv_type, adv_nu, adv_url, state_date, end_date, view_count, oper_user, oper_time, publish_user_id, publish_date, add_date, adv_publisher, adv_contact, adv_state, adv_content, adv_id, adv_site,actual_end_date FROM advertisement WHERE adv_id=:VADV_ID";
  public static String advertisement_SELDATE_TO_CHECK_AD = "SELECT trade_id FROM advertisement WHERE state_date>=:VSTATE_DATE AND end_date <=:VEND_DATE AND adv_id=:VADV_ID";
  public static String advertisement_SEL_ADVERTISEMENT_BY_ADV_ID_SEARCH = "select adv_title,adv_type,adv_content,adv_url from ADVERTISEMENT where adv_id=:VADV_ID and state_date<now() and end_date>now() and enable_tag=1 and adv_state=1 order by add_date desc";
  public static String advertisement_SEL_ADVSTATE = "select trade_id,adv_title,adv_type,state_date,end_date-now() state,adv_state,adv_id,adv_site from advertisement where adv_state=1 order by trade_id desc";
  public static String advertisement_SEL_AD_STATE = "SELECT trade_id, adv_title, adv_type, adv_nu, adv_url, state_date, end_date,  view_count, oper_user, oper_time, publish_user_id, publish_date, add_date, adv_publisher, adv_contact, adv_state, adv_id, adv_site,actual_end_date FROM advertisement WHERE adv_id like :VADV_ID AND adv_state = :VADV_STATE AND adv_title LIKE :VADV_TITLE AND adv_publisher LIKE :VADV_PUBLISHER ORDER BY add_date DESC";
  public static String advertisement_SEL_AD = "SELECT trade_id, adv_title, adv_type, adv_nu, adv_url, state_date, end_date,  view_count, oper_user, oper_time, publish_user_id, publish_date, add_date, adv_publisher, adv_contact, adv_state, adv_id, adv_site,actual_end_date FROM advertisement WHERE adv_id like :VADV_ID AND adv_title LIKE :VADV_TITLE AND adv_publisher LIKE :VADV_PUBLISHER ORDER BY add_date DESC";
  public static String adv_site_SEL_ADV_INFO = "select trade_id,adv_id,adv_type,adv_site,site_desc,price_desc,adv_code from adv_site where enable_tag=1 order by adv_id";
  public static String advertisement_SEL_ADNAME_BYID = "select adv_title,trade_id from advertisement where adv_id=:VADV_ID and adv_state=1 order by oper_time desc";
  public static String advertisement_SEL_ADVSTATE_BYID = "select end_date-now() state from advertisement where adv_id=:VADV_ID and adv_state=1 order by oper_time desc";
  public static String adv_site_INSELT_ONE_ADV = "insert into adv_site(TRADE_ID, ADV_ID, ADV_SITE, ADV_TYPE, SITE_DESC, PRICE_DESC, ENABLE_TAG, OPER_USER_ID, OPER_TIME, PUBLISH_USER_ID, PUBLISH_DATE, ADD_DATE, ADV_CODE) values(:VTRADE_ID, :VADV_ID, :VADV_SITE, :VADV_TYPE, :VSITE_DESC, :VPRICE_DESC, :VENABLE_TAG, :VOPER_USER_ID, now(), :VPUBLISH_USER_ID, now(), now(),:VADV_CODE)";
  public static String adv_site_SEL_ADVINFO = "select trade_id ,adv_id,adv_type,adv_site,site_desc,price_desc,enable_tag,adv_code from adv_site where adv_id=:VADV_ID and trade_id=:VTRADE_ID";
  public static String adv_site_UPDATE_ONE_ADV = "update adv_site set adv_type=:VADV_TYPE,enable_tag=:VENABLE_TAG,site_desc=:VSITE_DESC,price_desc=:VPRICE_DESC,oper_user_id=:VOPER_USER_ID,oper_time=now() where adv_id=:VADV_ID and trade_id=:VTRADE_ID";
  public static String adv_site_DELETE_ONE_ADV = "delete from adv_site where adv_id=:VADV_ID and trade_id=:VTRADE_ID";
  public static String adv_site_SEL_ADVNAME_BY_ADVID = "select adv_site from adv_site where adv_id=:VADV_ID";
  public static String cust_grading_SEL_BY_CUSTGRADE = "SELECT c.trade_id, c.order_id, c.for_cust_id, c.total_grade, c.product_quality, c.desc_consistency, c.attitude, c.delivery, c.evaluation_desc, c.cust_id, c.user_id, c.oper_user, c.oper_time, c.add_date, o.sale_cust_name, o.sale_cust_id FROM cust_grading c,order_sheet o WHERE c.order_id=o.order_id and for_cust_id IN(SELECT cust_id FROM company WHERE cust_name LIKE :VCUST_NAME) and total_grade=:VTOTAL_GRADE ORDER BY c.add_date DESC";
  public static String cust_grading_SEL_BY_GRADE = "SELECT c.trade_id, c.order_id, c.for_cust_id, c.total_grade, c.product_quality, c.desc_consistency, c.attitude, c.delivery, c.evaluation_desc, c.cust_id, c.user_id, c.oper_user, c.oper_time, c.add_date, o.sale_cust_name, o.sale_cust_id FROM cust_grading c,order_sheet o WHERE c.order_id=o.order_id and total_grade=:VTOTAL_GRADE ORDER BY c.add_date DESC";
  public static String data_parameter_GET_All_TOTALNAME = "select param_name,param_value from data_parameter where category_id=:VCATEGORY_ID order by category_id desc";
  public static String cust_grading_SEL_BY_CUST_NAME = "SELECT c.trade_id, c.order_id, c.for_cust_id, c.total_grade, c.product_quality, c.desc_consistency, c.attitude, c.delivery, c.evaluation_desc, c.cust_id, c.user_id, c.oper_user, c.oper_time, c.add_date, o.sale_cust_name, o.sale_cust_id FROM cust_grading c,order_sheet o WHERE c.order_id=o.order_id and for_cust_id IN(SELECT cust_id FROM company WHERE cust_name LIKE :VCUST_NAME) ORDER BY c.add_date DESC";
  public static String cust_grading_INSELT_ONE_EVALUATION_INFO = "INSERT INTO cust_grading(trade_id, order_id, for_cust_id, total_grade, product_quality, desc_consistency, attitude, delivery, evaluation_desc, cust_id, user_id, oper_user, oper_time, add_date) values(:VTRADE_ID, :VORDER_ID, :VFOR_CUST_ID, :VTOTAL_GRADE, :VPRODUCT_QUALITY, :VDESC_CONSISTENCY, :VATTITUDE, :VDELIVERY, :VEVALUATION_DESC, :VCUST_ID, :VUSER_ID, :VOPER_USER, now(), now())";
  public static String cust_grading_SEL_EVALUATION_BY_MEMBER = "SELECT c.trade_id, c.order_id, c.for_cust_id, c.total_grade, c.product_quality, c.desc_consistency, c.attitude, c.delivery, c.evaluation_desc, c.cust_id, c.user_id, c.oper_user, c.oper_time, c.add_date, o.sale_cust_name, o.sale_cust_id FROM cust_grading c,order_sheet o WHERE c.order_id=o.order_id ORDER BY c.add_date DESC";
  public static String cust_grading_SEL_EVALUATION_CONTENT_BY_TRADE = "SELECT c.trade_id, c.order_id, c.for_cust_id, c.total_grade, c.product_quality, c.desc_consistency, c.attitude, c.delivery, c.evaluation_desc, c.cust_id, c.user_id, c.oper_user, c.oper_time, c.add_date, o.sale_cust_name, o.sale_cust_id, o.buyer_cust_name, u.contact_name FROM cust_grading c, order_sheet o, user_info u WHERE c.order_id=o.order_id AND c.user_id=u.user_id AND c.trade_id=:VTRADE_ID";
  public static String order_sheet_SEL_ORDERINFO_BY_CUST = "SELECT order_id, order_name, sale_cust_id, sale_cust_name, order_type FROM order_sheet WHERE buyer_cust_id=:VBUYER_CUST_ID ORDER BY oper_date DESC";
  public static String cust_grading_SEL_EVALUATION_BY_ADMIN = "SELECT c.trade_id, c.order_id, c.for_cust_id, c.total_grade, c.product_quality, c.desc_consistency, c.attitude, c.delivery, c.evaluation_desc, c.cust_id, c.user_id, c.oper_user, c.oper_time, c.add_date, o.sale_cust_name, o.sale_cust_id, o.buyer_cust_name,o.buyer_cust_id, u.contact_name FROM cust_grading c, order_sheet o, user_info u WHERE c.order_id=o.order_id AND c.user_id=u.user_id ORDER BY c.add_date DESC";
  public static String cust_grading_SEL_EVALUATION_BY_CUST = "SELECT c.trade_id, c.order_id, c.for_cust_id, c.total_grade, c.product_quality, c.desc_consistency, c.attitude, c.delivery, c.evaluation_desc, c.cust_id, c.user_id, c.oper_user, c.oper_time, c.add_date, o.sale_cust_name, o.sale_cust_id, o.buyer_cust_name, o.buyer_cust_id, u.contact_name FROM cust_grading c, order_sheet o, user_info u WHERE c.order_id=o.order_id AND c.user_id=u.user_id AND for_cust_id=:VFOR_CUST_ID ORDER BY c.add_date DESC";
  public static String data_parameter_GET_GRADE_INFO = "SELECT t.category_name,t.param_value,t.param_name FROM data_parameter t WHERE t.category_id =:VCATEGORY_ID ORDER BY list_nu";
  public static String cust_grading_SELECT_EVALUATION_BY_ORDERIDD = "SELECT c.trade_id, c.order_id, c.for_cust_id, c.total_grade, c.cust_id, c.user_id, c.add_date, o.sale_cust_name, o.sale_cust_id, o.buyer_cust_name, u.contact_name FROM cust_grading c, order_sheet o, user_info u WHERE c.order_id=o.order_id AND c.user_id=u.user_id AND c.order_id LIKE :VORDER_ID ORDER BY c.add_date DESC";
  public static String cust_grading_SELECT_EVALUATION_BY_NOTIMEANDTOTAL = "SELECT c.trade_id, c.order_id, c.for_cust_id, c.total_grade, c.cust_id, c.user_id, c.add_date, o.sale_cust_name, o.sale_cust_id, o.buyer_cust_name,o.buyer_cust_id, u.contact_name FROM cust_grading c, order_sheet o, user_info u WHERE c.order_id=o.order_id AND o.buyer_cust_id=u.cust_id AND c.order_id LIKE :VORDER_ID AND u.contact_name LIKE :VCONTACT_NAME AND o.sale_cust_name like :VSALE_CUST_NAME ORDER BY c.add_date DESC";
  public static String cust_grading_SELECT_EVALUATION_BY_NOTIMEANDTOTAL2 = "SELECT c.trade_id, c.order_id, c.for_cust_id, c.total_grade, c.cust_id, c.user_id, c.add_date, o.sale_cust_name, o.sale_cust_id, o.buyer_cust_name,o.buyer_cust_id, u.contact_name FROM cust_grading c, order_sheet o, user_info u WHERE c.order_id=o.order_id AND o.buyer_cust_id=u.cust_id AND c.order_id LIKE :VORDER_ID AND u.contact_name LIKE :VCONTACT_NAME AND o.sale_cust_name like :VSALE_CUST_NAME AND c.add_date between :VSTART_DATE and :VEND_DATE ORDER BY c.add_date DESC";
  public static String cust_grading_SELECT_EVALUATION_BY_TIME = "SELECT c.trade_id, c.order_id, c.for_cust_id, c.total_grade, c.cust_id, c.user_id, c.add_date, o.sale_cust_name, o.sale_cust_id, o.buyer_cust_name,o.buyer_cust_id, u.contact_name FROM cust_grading c, order_sheet o, user_info u WHERE c.order_id=o.order_id AND o.buyer_cust_id=u.cust_id AND c.order_id LIKE :VORDER_ID AND u.contact_name LIKE :VCONTACT_NAME AND o.sale_cust_name LIKE :VSALE_CUST_NAME AND c.total_grade=:VTOTAL_TRADE AND c.add_date between :VSTART_DATE and :VEND_DATE";
  public static String cust_grading_SELECT_EVALUATION_BY_TIME2 = "SELECT c.trade_id, c.order_id, c.for_cust_id, c.total_grade, c.cust_id, c.user_id, c.add_date, o.sale_cust_name, o.sale_cust_id, o.buyer_cust_name,o.buyer_cust_id, u.contact_name FROM cust_grading c, order_sheet o, user_info u WHERE c.order_id=o.order_id AND o.buyer_cust_id=u.cust_id AND c.order_id LIKE :VORDER_ID AND u.contact_name LIKE :VCONTACT_NAME AND o.sale_cust_name LIKE :VSALE_CUST_NAME AND c.total_grade=:VTOTAL_TRADE AND c.add_date between :VSTART_DATE and :VEND_DATE";
  public static String cust_grading_SELECT_EVALUATION_BY_TOTAL = "SELECT c.trade_id, c.order_id, c.for_cust_id, c.total_grade, c.cust_id, c.user_id, c.add_date, o.sale_cust_name, o.sale_cust_id, o.buyer_cust_name,o.buyer_cust_id, u.contact_name FROM cust_grading c, order_sheet o, user_info u WHERE c.order_id=o.order_id AND o.buyer_cust_id=u.cust_id AND c.order_id LIKE :VORDER_ID AND u.contact_name LIKE :VCONTACT_NAME AND o.sale_cust_name LIKE :VSALE_CUST_NAME AND c.total_grade=:VTOTAL_TRADE";
  public static String data_parameter_GET_TOTALNAME = "select param_name from data_parameter where param_value=:VPARAM_VALUE and category_id=:VCATEGORY_ID order by category_id desc";
  public static String data_parameter_GET_TOTALNAME_SEARCH = "select param_name,param_value from data_parameter where category_id=:VCATEGORY_ID order by param_value desc";
  public static String cust_grading_SEL_EVAL = "SELECT c.trade_id, c.order_id, c.for_cust_id, c.total_grade, c.product_quality, c.desc_consistency, c.attitude, c.delivery, c.evaluation_desc, c.cust_id, c.user_id, c.oper_user, c.oper_time, c.add_date, o.sale_cust_name, o.sale_cust_id FROM cust_grading c,order_sheet o WHERE c.order_id=o.order_id AND o.sale_cust_name like :VSALE_CUST_NAME ORDER BY c.add_date DESC";
  public static String cust_grading_SEL_EVAL_BY_TOTAL = "SELECT c.trade_id, c.order_id, c.for_cust_id, c.total_grade, c.product_quality, c.desc_consistency, c.attitude, c.delivery, c.evaluation_desc, c.cust_id, c.user_id, c.oper_user, c.oper_time, c.add_date, o.sale_cust_name, o.sale_cust_id FROM cust_grading c,order_sheet o WHERE c.order_id=o.order_id AND\to.sale_cust_name like :VSALE_CUST_NAME AND total_grade=:VTOTAL_GRADE ORDER BY c.add_date DESC";
  public static String productattr_SEL_PRODUCT_ATTR_BY_CLASS_ID = "select a.class_id,a.attr_id,a.attr_name,a.attr_desc,a.default_tag,a.enable_tag from product_attr a where a.class_id =:VCLASS_ID";
  public static String productattr_SEL_PRODUCT_ATTR_BY_CLASS_IDTAG = "select a.class_id,a.attr_id,a.attr_name,a.attr_desc,a.default_tag,a.con_type from product_attr a where a.class_id =:VCLASS_ID and a.enable_tag=:VTAG";
  public static String productattr_INS_ATTR_INFO = "insert into product_attr (class_id,attr_id,attr_name,attr_desc,default_tag,enable_tag) values(:VCLASS_ID,:VATTR_ID,:VATTR_NAME,:VATTR_DESC,:VDEFAULT_TAG,:VENABLE_TAG)";
  public static String productattr_DEL_PRODUCTATTR_BY_ATTRID = "delete from product_attr where attr_id=:VATTR_ID";
  public static String productattr_UPDATE_PRODUCT_ATTR_BY_ATTR_ID = "update  product_attr t set t.attr_name=:VATTR_NAME,t.attr_desc=:VATTR_DESC,t.default_tag=:VDEFAULT_TAG,t.enable_tag=:VENABLE_TAG where t.attr_id =:VATTR_ID";
  public static String reportfrom_SEL_REPORT_BY_DATE = "select count(log_id) \"rcount\",date_format(l.dlsj,'%Y-%m-%d') as \"rdate\"  from logs l where date_format(l.dlsj,'%Y-%m') =:VDLSJ group by rdate";
  public static String reportfrom_SEL_REPORT_BY_MONTH = "select count(log_id) \"rcount\",date_format(l.dlsj,'%Y-%m') as \"rdate\" from logs l  where date_format(l.dlsj,'%Y-%m') >=:VBEGINDATE and date_format(l.dlsj,'%Y-%m') <=:VENDDATE group by date_format(l.dlsj,'%Y-%m')";
  public static String reportfrom_SEL_REPORT_BY_HH = "select count(log_id) \"rcount\",date_format(l.dlsj,'%Y-%m-%d %h') as \"rdate\" from logs l where date_format(l.dlsj,'%Y-%m-%d %h') >=:VBEGINDATE and date_format(l.dlsj,'%Y-%m-%d %h') <=:VENDDATE group by date_format(l.dlsj,'%Y-%m-%d %h')";
  public static String reportfrom_SEL_REPORT_BY_30DAY = "select count(log_id) \"rcount\",date_format(l.dlsj,'%Y-%m-%d') as \"rdate\" from logs l where date_format(l.dlsj,'%Y-%m-%d') >=:VBEGINDATE  and date_format(l.dlsj,'%Y-%m-%d') <=:VENDDATE group by date_format(l.dlsj,'%Y-%m-%d')";
  public static String reportfrom_SEL_REPORT_BY_AVG = "select count(log_id) as total , ( to_days(max(DLSJ))-to_days(min(DLSJ))) as days from logs ";
  public static String reportfrom_SEL_REPORT_BY_TOTAL = "select count(log_id) as total from logs ";
  public static String reportfrom_SEL_REPORT_BY_LLDZ = "select count(log_id) as total,llzj from logs group by llzj order by total desc ";
  public static String reportfrom_SEL_REPORT_BY_PAGEINFO = " select count(product_id) as total ,'产品' as tablename from product where  :VSTART_DATE < DISPLAY_START_DATE  and :VEND_DATE >= DISPLAY_START_DATE   union select count(sales_id) as total ,'供应' as tablename from sales  where :VSTART_DATE < DISPLAY_START_DATE  and :VEND_DATE >= DISPLAY_START_DATE  union select count(buying_id) as total ,'求购' as tablename from buying  where  :VSTART_DATE < START_DATE and :VEND_DATE >= START_DATE  union select count(news_id) as total ,'资讯' as tablename from news where  :VSTART_DATE < UPDATE_TIME and :VEND_DATE >= UPDATE_TIME  union select count(trade_id) as total ,'订单' as tablename from order_sheet_history where :VSTART_DATE < START_DATE  and :VEND_DATE >= START_DATE  union select count(RECOMMEND_Id) as total ,'推广' as tablename from recommend_list where  :VSTART_DATE < START_DATE  and :VEND_DATE >= START_DATE  union select count(trade_id) as total ,'缺货登记' as tablename from out_of_stock where :VSTART_DATE < IN_DATE  and :VEND_DATE >= IN_DATE  union select count(TRADE_ID) as total ,'举报投诉' as tablename from complaints  where :VSTART_DATE < IN_DATE  and :VEND_DATE >= IN_DATE";
  public static String reportfrom_SEL_REPORT_BY_CUSTINFOR = "select c.cust_name,count(l.log_id) as total ,substring_index(substring_index(l.LLDZ,'company/web/',-1),'/',1) as id,l.LLDZ  from logs l  left join company c on  l.LLDZ like CONCAT('%',c.cust_id,'%') where lldz like '%company/web%' and dlsj>= :VSTART_DATE and dlsj < :VEND_DATE group by l.LLDZ order by id";
  public static String reportfrom_SEL_REPORT_BY_CUSTINFOR_TOTAL = "select c.cust_id  from logs l  left join company c on  l.LLDZ like CONCAT('%',c.cust_id,'%') where lldz like '%company/web%' and dlsj>= :VSTART_DATE and dlsj < :VEND_DATE group by c.cust_id ";
  public static String reportfrom_SEL_REPORT_BY_USERINFO = "select u.ADD_DATE,c.cust_type,c.CHECK_TIME,c.INFO_AUTH,c.AUTH_DATE,u.USER_STATE as user_state,u.CHECK_TIME as user_cktime  from user_info u   inner join company c on u.cust_id = c.cust_id and cust_type <> 0  where ( c.CHECK_TIME >=:VSTART_DATE AND c.CHECK_TIME <:VEND_DATE ) or ( c.AUTH_DATE >=:VSTART_DATE AND c.AUTH_DATE <:VEND_DATE ) or ( c.CHECK_TIME >=:VSTART_DATE AND c.CHECK_TIME <:VEND_DATE ) or (  u.ADD_DATE >=:VSTART_DATE and u.ADD_DATE <:VEND_DATE )";
  public static String reportfrom_SEL_REPORT_BY_CUST_ADRESS = "select m.lldz,m.total_session,n.total_page,k.total_ip from ( select SUBSTRING_INDEX(SUBSTRING_INDEX(lldz,'?',1),'#',1) as lldz, count(distinct session_id) as total_session  from logs  where lldz <> 'null' AND DLSJ >=:VSTART_DATE AND DLSJ <:VEND_DATE group by SUBSTRING_INDEX(SUBSTRING_INDEX(lldz,'?',1),'#',1) order by  LLDZ ) m join  ( select SUBSTRING_INDEX(SUBSTRING_INDEX(lldz,'?',1),'#',1) as lldz, count( SUBSTRING_INDEX(SUBSTRING_INDEX(lldz,'?',1),'#',1) ) as total_page from logs  where lldz <> 'null' AND DLSJ >=:VSTART_DATE AND DLSJ <:VEND_DATE group by SUBSTRING_INDEX(SUBSTRING_INDEX(lldz,'?',1),'#',1) order by  LLDZ ) n on m.lldz = n.lldz join ( select SUBSTRING_INDEX(SUBSTRING_INDEX(lldz,'?',1),'#',1) as lldz, count(distinct user_ip) as total_ip from logs  where lldz <> 'null' AND DLSJ >=:VSTART_DATE AND DLSJ <:VEND_DATE group by SUBSTRING_INDEX(SUBSTRING_INDEX(lldz,'?',1),'#',1) order by  LLDZ ) k on k.lldz = n.lldz";
  public static String reportfrom_SEL_REPORT_BY_CUST_ADRESS_TOTAL = " select count(distinct SUBSTRING_INDEX(SUBSTRING_INDEX(lldz,'?',1),'#',1)) as total from logs where DLSJ >=:VSTART_DATE AND DLSJ <:VEND_DATE";
  public static String reportfrom_SEL_REPORT_BY_SEARCH = "  select k1.key_total,k1.llzj,k2.ip_total,k3.search_total from ( select count(m.qqzfc) as key_total,llzj from ( select count(SUBSTRING_INDEX(SUBSTRING_INDEX(qqzfc,'q=',-1),'&',1)) as result, SUBSTRING_INDEX(SUBSTRING_INDEX(qqzfc,'q=',-1),'&',1) as qqzfc, LLZJ from logs  where LLZJ like '%google%'  AND DLSJ >=:VSTART_DATE AND DLSJ <:VEND_DATE group by SUBSTRING_INDEX(SUBSTRING_INDEX(qqzfc,'q=',-1),'&',1) union select count(SUBSTRING_INDEX(SUBSTRING_INDEX(qqzfc,'?wd=',-1),'&',1)) as result, SUBSTRING_INDEX(SUBSTRING_INDEX(qqzfc,'?wd=',-1),'&',1) as qqzfc, LLZJ from logs  where LLZJ like '%baidu%'  AND DLSJ >=:VSTART_DATE AND DLSJ <:VEND_DATE group by SUBSTRING_INDEX(SUBSTRING_INDEX(qqzfc,'?wd=',-1),'&',1) union select count(SUBSTRING_INDEX(SUBSTRING_INDEX(qqzfc,'w=',-1),'&',1)) as result, SUBSTRING_INDEX(SUBSTRING_INDEX(qqzfc,'w=',-1),'&',1) as qqzfc, LLZJ from logs  where LLZJ like '%soso%'  AND DLSJ >=:VSTART_DATE AND DLSJ <:VEND_DATE group by SUBSTRING_INDEX(SUBSTRING_INDEX(qqzfc,'w=',-1),'&',1) union select count(SUBSTRING_INDEX(SUBSTRING_INDEX(qqzfc,'p=',-1),'&',1)) as result, SUBSTRING_INDEX(SUBSTRING_INDEX(qqzfc,'p=',-1),'&',1) as qqzfc, LLZJ from logs  where LLZJ like '%yahoo%' AND DLSJ >=:VSTART_DATE AND DLSJ <:VEND_DATE group by SUBSTRING_INDEX(SUBSTRING_INDEX(qqzfc,'p=',-1),'&',1) union select count(SUBSTRING_INDEX(SUBSTRING_INDEX(qqzfc,'q=',-1),'&',1)) as result, SUBSTRING_INDEX(SUBSTRING_INDEX(qqzfc,'q=',-1),'&',1) as qqzfc, LLZJ from logs  where LLZJ like '%bing%' AND DLSJ >=:VSTART_DATE AND DLSJ <:VEND_DATE group by SUBSTRING_INDEX(SUBSTRING_INDEX(qqzfc,'q=',-1),'&',1) ) m group by m.llzj ) k1 left join ( select count(distinct user_ip) as ip_total,LLZJ from logs where LLZJ like '%baidu%' or LLZJ like '%google%' or LLZJ like '%yahoo%' or LLZJ like '%bing%' or LLZJ like '%soso%'  AND DLSJ >=:VSTART_DATE AND DLSJ <:VEND_DATE group by llzj ) k2 on k1.llzj=k2.llzj left join ( select count(log_id) as search_total,LLZJ from logs where LLZJ like '%baidu%' or LLZJ like '%google%' or LLZJ like '%yahoo%' or LLZJ like '%bing%' or LLZJ like '%soso%'  AND DLSJ >=:VSTART_DATE AND DLSJ <:VEND_DATE group by llzj ) k3 on k1.llzj=k3.llzj";
  public static String logs_record_SEL_LOGSRECODE_INFOS = "select t.record_id,t.user_name,t.cust_name,t.cust_id,t.user_id,t.add_time,t.menu_path from logs_record t order by t.add_time desc ";
  public static String logs_record_SEL_LOGS_BY_TIME = "select t.record_id,t.user_name,t.cust_name,t.cust_id,t.user_id,t.add_time,t.menu_path from logs_record t where  t.add_time >= :VBEINGTIME and t.add_time<= :VENDTIME order by t.add_time desc";
  public static String logs_record_SEL_LOGS_BY_USERNAME = "select t.record_id,t.user_name,t.cust_name,t.cust_id,t.user_id,t.add_time,t.menu_path from logs_record t where t.user_name like :VUSER_NAME order by t.add_time desc";
  public static String logs_record_SEL_LOGS_BY_USERNAME_TIME = "select t.record_id,t.user_name,t.cust_name,t.cust_id,t.user_id,t.add_time,t.menu_path from logs_record t where t.user_name like :VUSER_NAME and t.add_time >= :VBEINGTIME and t.add_time<= :VENDTIME order by t.add_time desc ";
  public static String logs_record_SEL_LOGS_BY_CUSTNAME = "select t.record_id,t.user_name,t.cust_name,t.cust_id,t.user_id,t.add_time,t.menu_path from logs_record t where t.cust_name like :VCUST_NAME";
  public static String logs_record_SEL_LOGS_BY_CUSTNAME_TIME = "select t.record_id,t.user_name,t.cust_name,t.cust_id,t.user_id,t.add_time,t.menu_path from logs_record t where t.cust_name like :VCUST_NAME and t.add_time >= :VBEINGTIME and t.add_time<= :VENDTIME order by t.add_time desc ";
  public static String logs_record_SEL_LOGS_BY_CUSTNAME_USERNAME = "select t.record_id,t.user_name,t.cust_name,t.cust_id,t.user_id,t.add_time,t.menu_path from logs_record t where t.cust_name like :VCUST_NAME and t.user_name like :VUSER_NAME ";
  public static String logs_record_SEL_LOGS_CUSTNAME_USERNAME_TIME = "select t.record_id,t.user_name,t.cust_name,t.cust_id,t.user_id,t.add_time,t.menu_path from logs_record t where t.cust_name like :VCUST_NAME and t.user_name like :VUSER_NAME and t.add_time >= :VBEINGTIME and t.add_time<= :VENDTIME order by t.add_time desc ";
  public static String logs_record_DEL_LOGS_BY_LOGSID = "delete from logs_record where record_id =:VLOGS_ID";
  public static String logs_record_SEL_LOGS_BYLOGSID = "select t.record_id,t.user_name,t.cust_name,t.cust_id,t.user_id,t.add_time,t.menu_path,t.content from logs_record t where t.record_id =:VLOGS_ID";
  public static String data_parameter_SEL_DATAPARAMETERNAME = "select category_id,category_name,category_code,param_value,param_name from data_parameter where category_id='100000000000006' order by list_nu";
  public static String data_parameter_SEL_DATAPARAMETERYGRS = "select category_id,category_name,category_code,param_value,param_name from data_parameter where category_id='100000000000008' order by list_nu";
  public static String data_parameter_SEL_BY_NAME_FOR_VALUE = "select param_name from data_parameter where param_value=:VPARAM_VALUE and category_id='100000000000006'";
  public static String data_parameter_SEL_BY_NAME_FOR_VALUE_YGRS = "select param_name from data_parameter where param_value=:VPARAM_VALUE and category_id='100000000000008'";
  public static String data_parameter_SEL_DATAPARAMETERALLINFO = "select category_id,category_code,list_nu,param_value,param_name from data_parameter where category_id=:VCATEGORY_NAME order by list_nu";
  public static String data_parameter_SEL_DATAPARAM_BY_NAMEVALUE = "select category_id,category_code,list_nu,param_value,param_name from data_parameter where category_code=:VCATEGORY_CODE order by list_nu";
  public static String data_parameter_SEL_DATAPARAMETERALLINFOO = "select param_name from data_parameter where category_id=:VCATEGORY_NAME and param_value=:VPARAM_VALUE";
  public static String data_parameter_SEL_DATAPARAMETERONEINFO = "select category_name,category_id,category_code,list_nu,param_value,param_name from data_parameter where param_value=:VPARAM_VALUE and category_id=:VCATEGORY_ID";
  public static String data_parameter_SEL_DATAPARAMETERINFO = "select distinct category_id,category_name from data_parameter";
  public static String data_parameter_EDIT_DATAPARAMETERINFO = "update data_parameter set list_nu=:VLIST_NU,param_value=:VPARAM_VALUE_INPUT,param_name=:VPARAM_NAME,oper_user=:VOPER_USER,oper_time=now() where param_value=:VPARAM_VALUE and category_id=:VCATEGORY_ID";
  public static String data_parameter_DELETE_DATAPARAMETER_INFO = "delete from data_parameter where param_value=:VPARAM_VALUE and category_id=:VCATEGORY_ID";
  public static String data_parameter_ADD_DATAPARAMETERINFO = "insert into data_parameter (category_id,category_name,category_code,list_nu,param_value,param_name,add_user,add_time) values (:VCATEGORY_ID,:VCATEGORY_NAME,:VCATEGORY_CODE,:VLIST_NU,:VPARAM_VALUE,:VPARAM_NAME,:VADD_USER,now())";
  public static String company_SEL_USER_STATE_BY_CHECK = "SELECT cust_id FROM company WHERE cust_state=0";
  public static String company_SEL_USER_STATE_BY_ATTEST = "SELECT cust_id FROM company WHERE info_auth=0 OR info_auth=3";
  public static String product_SEL_PRODUCT_STATE_BY_CHECK = "SELECT product_id FROM product WHERE validity=0 AND product_type=:VPRODUCT_TYPE";
  public static String sales_SEL_SALES_STATE_BY_CHECK = "SELECT sales_id FROM sales WHERE validity=0";
  public static String buying_SEL_BUYING_STATE_BY_CHECK = "SELECT buying_id FROM buying WHERE validity=0 OR validity=2";
  public static String recommend_list_SEL_RECOMMEND_STATE_BY_CHECK = "SELECT recommend_id FROM recommend_list WHERE recommend_state=0";
  public static String COMPLAINTS_SEL_COMPLAINTS_STATE_BY_CHECK = "SELECT trade_id FROM complaints WHERE read_state=0";
  public static String order_sheet_SEL_DAITIJIAO_ORDER_INFO = "select order_id from order_sheet where order_type=:VORDER_TYPE and buyer_cust_id=:VBUYER_CUST_ID";
  public static String order_sheet_SEL_DAIQUEREN_ORDER_INFO = "select order_id from order_sheet where order_type=:VORDER_TYPE and sale_cust_id=:VSALE_CUST_ID";
  public static String product_SEL_PRODUCT_TIME_BY_CHECK = "select product_id from product where cust_id=:VCUST_ID and product_type=:VPRODUCT_TYPE and validity<>9 and round(to_number(display_end_date-now()))<=7 and round(to_number(display_end_date-now()))>=0";
  public static String inquiry_SEL_MESSAGENUM_BY_READ = "select trade_id from inquiry where read=0 and cust_id=:VCUST_ID";
  public static String order_sheet_SEL_ORDERNUM_BY_BUYER = "select order_id from order_sheet where buyer_cust_id=:VBUYER_CUST_ID";
  public static String order_sheet_SEL_ORDERNUM_BY_SALE = "select order_id from order_sheet where sale_cust_id=:VSALE_CUST_ID and order_type!='0' and order_type!='6'";
  public static String product_GET_PRODUCTNUM_BY_CUST_ID = "select product_id from product where cust_id=:VCUST_ID and product_type=:VPRODUCT_TYPE and validity <>9 ";
  public static String product_GET_FUWUNUM_BY_CUST_FABU = "select product_id from product where cust_id=:VCUST_ID and product_type=:VPRODUCT_TYPE and validity=1";
  public static String product_GET_FUWUNUM_BY_CUST_WEIFB = "select product_id from product where cust_id=:VCUST_ID and product_type=:VPRODUCT_TYPE and (validity=0 or validity=8)";
  public static String product_GET_PRODUCTNUM_SHANGJIA = "select product_id from product where cust_id=:VCUST_ID and product_type=:VPRODUCT_TYPE and validity = 1 and display_start_date<=now() and display_end_date>=now()";
  public static String product_GET_PRODUCTNUM_XIAJIA = "select product_id,display_end_date,display_start_date,product_type,validity from product where (cust_id=:VCUST_ID and product_type=0 and validity = 7) or (cust_id=:VCUST_ID and product_type=0 and display_end_date<=now())";
  public static String sales_SEL_SUPPLYNUM_BY_CUSTANDDATE = "SELECT sales_id FROM sales WHERE validity=1 and cust_id=:VCUST_ID and display_start_date<=now() and display_end_date>=now()";
  public static String buying_SEL_STOCKNUM_BY_CUSTANDDATE = "SELECT buying_id,start_date,end_date FROM buying WHERE validity=1 AND cust_id=:VCUST_ID and  start_date<=now() and end_date>=now()";
  public static String recommend_list_SEL_RECOMMENDNUM_STATE = "SELECT recommend_id FROM recommend_list WHERE cust_id=:VCUST_ID AND recommend_state=1 AND start_date<=now() AND end_date>=now()";
  public static String out_of_stock_SEL_BUYING_STATE_BY_CHECKTWO = "select trade_id from out_of_stock  where read_state=0";
  public static String leavewords_SEL_LEAVEWORDS_BY_NOREAD = "select leave_id from leavewords where for_leave_cust=:VFOR_LEAVE_CUST";
  public static String company_SEL_COMPANY_BY_PRODUCTCLASS = "select cust_id,cust_name,company_address,company_scope,level_id from company where cust_supply like :VCUST_SUPPLY and cust_state=1 and display=1 order by add_date desc";
  public static String company_GET_COMPANYINFO_LIST_KEY_EVAL = "select cust_id,cust_name from company where cust_type != 0 and cust_name like :VKEYWORD";
  public static String company_GET_COMPANYINFO_LIST_EVAL = "select cust_id,cust_name from company where cust_type != 0";
  public static String pay_type_INS_ONE_PAY_TYPE_INFO = "insert into pay_type(type_id,type_name,type_value,enable_tag,remark,add_date) values (:VTYPE_ID,:VTYPE_NAME,:VTYPE_VALUE,:VENABLE_TAG,:VREMARK,now())";
  public static String pay_type_SEL_PAY_TYPE_LISY_BY_TYPE_ID = "select type_name,type_value,enable_tag,remark,add_date from pay_type where type_id = :VTYPE_ID";
  public static String pay_type_UPDATE_ONE_PAY_TYPE_INFO = "update pay_type set type_name=:VTYPE_NAME,type_value=:VTYPE_VALUE,enable_tag=:VENABLE_TAG,remark=:VREMARK where type_id =:VTYPE_ID";
  public static String pay_type_SEL_PAY_TYPE_INFO = "select type_id,type_name,type_value,enable_tag,remark,add_date from pay_type";
  public static String pay_type_SEL_PAYTYPE_BY_TYPE_NAME = "select type_id,type_name,type_value,enable_tag,remark,add_date from pay_type where type_name like :VTYPE_NAME";
  public static String ad_image_INS_ONE_AD_IMAGE_INFO = "insert into ad_image (id,company_name,logo,url,cust_id,user_id,add_date, oper_time, contact_name) values(:VID,:VCOMPANY_NAME,:VLOGO,:VURL,:VCUST_ID,:VUSER_ID,now(),now(),:VCONTACT_NAME)";
  public static String ad_image_SEL_ONE_AD_IMAGE_INFO_BY_ID = "select id,company_name,logo,url,cust_id,user_id,add_date, oper_time, contact_name from ad_image where id =:VID ";
  public static String ad_image_UPDATE_ONE_AD_IMAGE_INFO = "update ad_image set company_name=:VCOMPANY_NAME,url=:VURL,user_id=:VUSER_ID, oper_time=now(), contact_name=:VCONTACT_NAME,logo=:VLOGO where id =:VID";
  public static String ad_image_SEL_ADVICE_INFO = "select id,company_name,logo,url,cust_id,user_id,add_date, oper_time, contact_name from ad_image where company_name like :VKEYWORD order by oper_time desc";
  public static String ad_image_DELETE_BY_ID = "delete from ad_image where id =:VID ";
  public static String area_info_SEL_COUNTER = "select area_id,area_name from area_info  where char_length(trim(area_id))<4 and char_length(trim(area_id))>1 order by area_id";
  public static String area_info_SEL_COUNTER_BY_ID = "select area_id,area_name from area_info  where area_id like :VAREA_ID and char_length(trim(area_id))>3 and char_length(trim(area_id))<7";
  public static String company_dt_DEL_COMPANY_INPUT = "delete from company_dt where id=:VID";
  public static String company_SEL_CHECK_CODE = "select cust_id from company where cust_name=:VCUST_NAME";
  public static String role_GET_ROLE = "select role_auth_id,role_name from role where role_type='0' group by role_auth_id";
  public static String site_parameter_GET_PARAMTER_ALL = "select param_name,param_value from site_parameter";
  public static String site_parameter_UPDATE_PARAM_INFO = "update site_parameter set param_value= ? where param_name= ? ";
  public static String company_dt_UP_COMPANY_CHECK = "update company_dt set validity=:VVALIDITY, check_user=:VCHECK_USER,check_time=now() where id=:VID";
  public static String product_DEL_BY_MEMBER = "UPDATE PRODUCT  SET validity=:VVALIDITY WHERE product_id=:VBUYING_ID AND cust_id=:VCUST_ID";
  public static String maxproduct_DEL_BY_MEMBER = "delete from maxproduct WHERE product_id=:VBUYING_ID";
  public static String user_info_SEL_DEFAULT_ROLE = "UPDATE user_info  SET role_auth_id=:VROLE_AUTH_ID WHERE cust_id=:VCUST_ID";
  public static String news_class_SEL_CLASS_INFO1 = "select class_id,class_name from news_class where length(class_id)=3";
  public static String news_class_SEL_CLASS_INFO2 = "select class_id,class_name from news_class where class_id like :VCLASS_ID and length(class_id)=:VLENGTH";
  public static String company_UP_TYPE = "update company set type=:VTYPE where cust_id=:VCUST_ID";
  public static String product_class_GET_PRODUCT_CLASS_FIRST = "select class_id,class_name from product_class where length(class_id)=6";
  public static String attach_ADD_PIC = "insert attach(attach_id,attach_root_id,file_type,file_path) values(:VATTACH_ID,:VATTACH_ROOT_ID,:VFILE_TYPE,:VFILE_PATH)";
  public static String bookmark_SOUCHANG_BRAND = "INSERT INTO BOOKMARK(LINK_ID,CUST_ID,LINK_NAME,LINK_URL,LINK_TYPE,ENABLE_TAG,OPER_USER,OPER_TIME,IN_DATE) values(:VLINK_ID,:VCUST_ID,:VLINK_NAME,:VLINK_URL,:VLINK_TYPE,'1',:VOPER_USER,now(),now())";
  public static String company_SEL_USER_BY_STATE = "select t1.cust_name,t1.info_auth,t1.add_date,t2.user_name,t2.user_id,t2.cust_id,t2.contact_name,t2.user_id from company t1,user_info t2 where t1.cust_id=t2.cust_id and t1.cust_type=:VCUST_TYPE and t1.cust_state=:VCUST_STATE order by t1.add_date desc";
  public static String company_SEL_USERINFO_BY_ID = "select t1.cust_name,t1.info_auth,t1.add_date,t1.email,t1.cell_phone,t2.user_name,t2.user_id,t2.cust_id,t2.contact_name,t2.qq,t2.msn,t2.phone from company t1,user_info t2 where t1.cust_id=t2.cust_id and t1.cust_id=:VCUST_ID";
}

